import { useEscHint } from '@/hooks/use-esc-hint'; import { CloseOutlined } from '@ant-design/icons'; import { Button, Drawer, type DrawerProps } from 'antd'; /** * use ColumnWrapper to wrap content in Drawer with scroller * 57px is the height of header * @param props * @returns */ const ScrollerModal = (props: DrawerProps) => { const { title, closable = true, maskClosable = false, styles, ...restProps } = props; const { EscHint } = useEscHint({ enabled: !props.keyboard && props.open }); const handleCancel = (e: React.MouseEvent) => { props.onClose?.(e); }; return ( <> {title} {closable && ( )} } > {restProps.children} {EscHint} ); }; export default ScrollerModal;