0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/ui-src/components/Wrapper/Wrapper.tsx

23 lines
546 B
TypeScript
Raw Permalink Normal View History

import { CSSProperties, PropsWithChildren, forwardRef } from 'react';
import styles from './Wrapper.module.css';
type WrapperProps = PropsWithChildren & {
style?: CSSProperties;
overflowing?: boolean;
};
const Wrapper = forwardRef<HTMLDivElement, WrapperProps>(
({ style, overflowing = false, children }: WrapperProps, ref) => {
return (
2024-06-19 10:01:37 -05:00
<div ref={ref} className={styles.wrapper} style={style} data-overflowing={overflowing}>
{children}
</div>
);
}
);
Wrapper.displayName = 'Wrapper';
export { Wrapper };