Skip to content

Commit

Permalink
Use our Backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasSlama committed Jun 27, 2024
1 parent a6e2090 commit eb0c515
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/calm-trainers-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@toptal/picasso-drawer': patch
---

- use Picasso Backdrop to remove `React does not recognize the `transitionDuration` prop on a DOM element` error
1 change: 1 addition & 0 deletions packages/base/Drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
"dependencies": {
"@toptal/picasso-backdrop": "1.0.4",
"@toptal/picasso-button": "2.1.0",
"@toptal/picasso-container": "1.0.3",
"@toptal/picasso-icons": "1.4.0",
Expand Down
8 changes: 7 additions & 1 deletion packages/base/Drawer/src/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Drawer as MUIDrawer } from '@material-ui/core'
import type { BackdropProps } from '@material-ui/core'
import type { Theme } from '@material-ui/core/styles'
import { makeStyles, useTheme } from '@material-ui/core/styles'
import cx from 'classnames'
Expand All @@ -8,6 +9,7 @@ import type { ReactNode } from 'react'
import React from 'react'
import { CloseMinor16 } from '@toptal/picasso-icons'
import { ButtonCircular } from '@toptal/picasso-button'
import { Backdrop } from '@toptal/picasso-backdrop'
import { Container } from '@toptal/picasso-container'
import {
useIsomorphicLayoutEffect,
Expand Down Expand Up @@ -90,7 +92,11 @@ export const Drawer = (props: Props) => {
{...rest}
open={open}
onClose={handleOnClose}
BackdropComponent={disableBackdrop ? () => null : undefined}
BackdropComponent={
disableBackdrop
? () => null
: (Backdrop as React.ElementType<BackdropProps>)
}
BackdropProps={{ invisible: transparentBackdrop }}
disablePortal={disablePortal}
container={container}
Expand Down
1 change: 1 addition & 0 deletions packages/base/Drawer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"include": ["src"],
"references": [
{ "path": "../../picasso-provider" },
{ "path": "../Backdrop" },
{ "path": "../Button" },
{ "path": "../Container" },
{ "path": "../Icons" },
Expand Down

0 comments on commit eb0c515

Please sign in to comment.