full-screen-drawer.tsx 817 B

123456789101112131415161718192021222324252627282930313233343536
  1. import React, { type FC } from 'react'
  2. import Drawer from '@/app/components/base/drawer'
  3. import classNames from '@/utils/classnames'
  4. type IFullScreenDrawerProps = {
  5. isOpen: boolean
  6. onClose?: () => void
  7. fullScreen: boolean
  8. children: React.ReactNode
  9. }
  10. const FullScreenDrawer: FC<IFullScreenDrawerProps> = ({
  11. isOpen,
  12. onClose = () => {},
  13. fullScreen,
  14. children,
  15. }) => {
  16. return (
  17. <Drawer
  18. isOpen={isOpen}
  19. onClose={onClose}
  20. panelClassname={classNames('!p-0 bg-components-panel-bg',
  21. fullScreen
  22. ? '!max-w-full !w-full'
  23. : 'mt-16 mr-2 mb-2 !max-w-[560px] !w-[560px] border-[0.5px] border-components-panel-border rounded-xl',
  24. )}
  25. mask={false}
  26. unmount
  27. footer={null}
  28. >
  29. {children}
  30. </Drawer>)
  31. }
  32. export default FullScreenDrawer