import { Icon, Modal } from '@bentwnghk/ui'; import { createStyles } from 'antd-style'; import { LucideIcon } from 'lucide-react'; import { rgba } from 'polished'; import { ReactNode, memo } from 'react'; import { Flexbox } from 'react-layout-kit'; const useStyles = createStyles(({ css, token, prefixCls, isDarkMode }) => ({ modalTitle: css` &.${prefixCls}-modal-header { height: 80px; background: linear-gradient( 180deg, ${rgba(token.colorBgElevated, 0)}, ${token.colorBgContainer} ${isDarkMode ? '80' : '140'}px ), fixed 0 0 /10px 10px radial-gradient(${token.colorFill} 1px, transparent 0); } & .${prefixCls}-modal-title { font-size: 24px; } `, })); interface DataStyleModalProps { children: ReactNode; height?: number | string; icon: LucideIcon; onOpenChange?: (open: boolean) => void; open: boolean; title: string; width?: number; } const DataStyleModal = memo( ({ icon, onOpenChange, title, open, children, width = 550, height }) => { const { styles } = useStyles(); return ( {title} } width={width} > {children} ); }, ); export default DataStyleModal;