您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

full-screen-drawer.tsx 846B

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