mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
22 lines
546 B
TypeScript
22 lines
546 B
TypeScript
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 (
|
|
<div ref={ref} className={styles.wrapper} style={style} data-overflowing={overflowing}>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
);
|
|
|
|
Wrapper.displayName = 'Wrapper';
|
|
|
|
export { Wrapper };
|