Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions apps/web/src/components/AppDrawer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { FC, ReactNode, useRef } from 'react'
import {
Box,
Drawer,
DrawerBody,
DrawerCloseButton,
DrawerContent,
DrawerHeader,
DrawerOverlay,
useDisclosure,
} from '@chakra-ui/react'
import { Box, Drawer, DrawerBody, DrawerContent, DrawerHeader, DrawerOverlay, useDisclosure } from '@chakra-ui/react'

export type TProps = {
title?: string,
Expand All @@ -25,13 +16,14 @@ export const AppDrawer: FC<TProps> = ({ children, title, trigger }) => {
<Box ref={btnRef} onClick={onOpen} cursor='pointer'>
{trigger}
</Box>
<Drawer isOpen={isOpen} placement='left' onClose={onClose} finalFocusRef={btnRef} size={'xs'}>
<Drawer isOpen={isOpen} placement='left' onClose={onClose} finalFocusRef={btnRef}>
<DrawerOverlay />
<DrawerContent>
<DrawerCloseButton />
<DrawerHeader>{title}</DrawerHeader>
<DrawerBody>
<Box onClick={onClose}>{children}</Box>
<DrawerContent maxW='100px'>
<DrawerHeader p={0}>{title}</DrawerHeader>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Без p=0 там есть паддинги?

<DrawerBody p={0}>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И тут

<Box pt={3} onClick={onClose}>
{children}
</Box>
</DrawerBody>
</DrawerContent>
</Drawer>
Expand Down