2024-05-13 03:08:26 -05:00
|
|
|
import { CSSProperties, PropsWithChildren, forwardRef } from 'react';
|
2024-05-09 05:56:45 -05:00
|
|
|
|
|
|
|
import styles from './Wrapper.module.css';
|
|
|
|
|
|
|
|
type WrapperProps = PropsWithChildren & {
|
|
|
|
style?: CSSProperties;
|
2024-05-13 03:08:26 -05:00
|
|
|
overflowing?: boolean;
|
2024-05-09 05:56:45 -05:00
|
|
|
};
|
|
|
|
|
2024-05-13 03:08:26 -05:00
|
|
|
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}>
|
2024-05-13 03:08:26 -05:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
Wrapper.displayName = 'Wrapper';
|
|
|
|
|
|
|
|
export { Wrapper };
|