Skip to content

Commit

Permalink
fix: remove modal prop en Drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil committed Jul 27, 2023
1 parent 387cad6 commit b73d68c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/Drawer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const DrawerComponent = forwardRef<'div', DrawerProps>(
withBackdrop ? <S.Backdrop hideOnInteractOutside={hideOnInteractOutside} /> : false
}
hideOnInteractOutside={hideOnInteractOutside}
modal={withBackdrop}
ref={ref}
render={<S.Drawer placement={placement} size={size} />}
store={store}
Expand Down
3 changes: 2 additions & 1 deletion packages/Drawer/tests/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ describe('<Drawer>', () => {
it('should render "as" correctly', () => {
const Test = () => {
const drawer = useDrawer()
const onClick = jest.fn()

return (
<>
<Drawer.Trigger as="button" onClick={() => null} store={drawer}>
<Drawer.Trigger as="button" onClick={onClick} store={drawer}>
open
</Drawer.Trigger>
<Drawer aria-label="drawer" store={drawer}>
Expand Down

0 comments on commit b73d68c

Please sign in to comment.