Skip to content

Commit

Permalink
Task/htl 111365 fix props override for collapse and close (#1530)
Browse files Browse the repository at this point in the history
* task(HTL-111365): Fix props override for collapse and close

* Rush change
  • Loading branch information
coolestKev authored Nov 8, 2024
1 parent 58388e4 commit 3deed57
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "pcln-design-system",
"comment": "Fix storybook buttons",
"type": "minor"
}
],
"packageName": "pcln-design-system"
}
2 changes: 1 addition & 1 deletion packages/core/src/Drawer/Drawer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function DrawerStory(props) {
heading='Header'
isOpen={isOpen}
isCollapsed={isCollapsed}
{...props}
onClose={includeCloseButton ? () => setIsOpen(false) : undefined}
onCollapse={includeCollapseButton ? () => setIsCollapsed((isCollapsed) => !isCollapsed) : undefined}
{...props}
>
{props.children}
</Drawer>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export const Drawer: React.FC<DrawerProps> = ({
maxHeight={isMobile ? ['290px', '400px', '480px', 'calc(100vh - 64px)'] : props.height ?? '100%'}
maxWidth={isMobile ? '100%' : ['400px', '600px', '800px', '100%']}
width={isMobile ? '100%' : props.width}
height={!isCollapsed && props.height ? props.height : 'fit-content'}
{...props}
height={!isCollapsed && props.height ? props.height : 'fit-content'}
>
<DrawerRoot
data-testid='drawer'
Expand Down

0 comments on commit 3deed57

Please sign in to comment.