Skip to content

Commit

Permalink
fix: inline-alert clone after duration over
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitskvmdam committed Dec 20, 2021
1 parent 2816871 commit a04485b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/inline-alert/inline-alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export const InlineAlert = forwardRef<HTMLDivElement, InlineAlertProps>(
csx = {},
containerProps = {},
isOpen = false,
onClose,
duration = 5000,
...rest
} = props

Expand All @@ -108,6 +110,7 @@ export const InlineAlert = forwardRef<HTMLDivElement, InlineAlertProps>(
<Collapsible in={isOpen} {...containerProps}>
<InlineAlertRoot
isOpen
duration={isOpen ? duration : 0}
type={type}
hasAnimation={hasAnimation}
csx={{
Expand All @@ -123,6 +126,7 @@ export const InlineAlert = forwardRef<HTMLDivElement, InlineAlertProps>(
}}
portalProps={{ hasUseReactPortal: false }}
ref={ref}
onClose={onClose}
{...rest}
/>
</Collapsible>
Expand Down

0 comments on commit a04485b

Please sign in to comment.