diff --git a/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.module.scss b/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.module.scss index d8f04058b0..99ad57d8c8 100644 --- a/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.module.scss +++ b/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.module.scss @@ -5,6 +5,10 @@ height: 100%; background: tokens.$coral-color-neutral-background; display: flex; + flex-flow: column; + justify-content: stretch; + align-items: stretch; + flex-wrap: nowrap; .header { flex-grow: 0; @@ -20,7 +24,7 @@ flex-shrink: 1; flex-basis: 0; overflow: auto; - + flex-flow: column; display: flex; } diff --git a/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.tsx b/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.tsx index 3d85e2affd..7dab5fe374 100644 --- a/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.tsx +++ b/packages/design-system/src/components/Drawer/Primitive/PrimitiveDrawer.tsx @@ -1,6 +1,5 @@ import { forwardRef } from 'react'; -import type { Ref, ReactNode } from 'react'; -import { StackVertical } from '../../Stack'; +import type { ReactNode, Ref } from 'react'; import theme from './PrimitiveDrawer.module.scss'; @@ -13,11 +12,9 @@ export type DrawerProps = { export const PrimitiveDrawer = forwardRef( ({ header, children, footer }: DrawerProps, ref: Ref) => (
- - {header &&
{header}
} -
{children}
- {footer &&
{footer}
} -
+ {header &&
{header}
} +
{children}
+ {footer &&
{footer}
}
), ); diff --git a/packages/design-system/src/stories/navigation/FloatingDrawer.stories.tsx b/packages/design-system/src/stories/navigation/FloatingDrawer.stories.tsx index 6002de75ee..3c077ae4f0 100644 --- a/packages/design-system/src/stories/navigation/FloatingDrawer.stories.tsx +++ b/packages/design-system/src/stories/navigation/FloatingDrawer.stories.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { StoryFn } from '@storybook/react'; import { screen, userEvent } from '@storybook/testing-library'; -import { ButtonPrimary, FloatingDrawer, FloatingDrawerProps } from '../../'; +import { ButtonPrimary, FloatingDrawer, FloatingDrawerProps, InlineEditing } from '../../'; import { Area } from '../docs/Area'; export default { @@ -55,6 +55,17 @@ const defaultProps = { footer: Footer, }; +const overflowProps = { + ...defaultProps, + children: ( + + ), +}; + const playOpenDrawer = async () => { const openButton = screen.getByRole('button'); await userEvent.click(openButton); @@ -75,6 +86,17 @@ export const Simple: StoryFn = ( ); Simple.args = defaultProps; +export const Overflow: StoryFn = ({ + disclosure, + visible, + ...props +}: FloatingDrawerProps) => ( + + + +); +Overflow.args = overflowProps; + export const WithDisclosure: StoryFn = () => (