diff --git a/src/components/Sheet/Sheet.scss b/src/components/Sheet/Sheet.scss index 45c360d767..8f5cc07ca2 100644 --- a/src/components/Sheet/Sheet.scss +++ b/src/components/Sheet/Sheet.scss @@ -86,6 +86,10 @@ $block: '.#{variables.$ns}sheet'; } } + &__inner-content { + overflow: auto; + } + &__sheet-content-title { padding-block-end: 8px; font-size: var(--g-text-body-2-font-size); diff --git a/src/components/Sheet/SheetContent.tsx b/src/components/Sheet/SheetContent.tsx index a8ed9e2169..93e135b4cf 100644 --- a/src/components/Sheet/SheetContent.tsx +++ b/src/components/Sheet/SheetContent.tsx @@ -185,7 +185,12 @@ class SheetContent extends React.Component )} -
{content}
+
+ {content} +
diff --git a/src/components/Sheet/__stories__/DefaultShowcase/DefaultShowcase.scss b/src/components/Sheet/__stories__/DefaultShowcase/DefaultShowcase.scss index 11c3e6797b..75ad9a0168 100644 --- a/src/components/Sheet/__stories__/DefaultShowcase/DefaultShowcase.scss +++ b/src/components/Sheet/__stories__/DefaultShowcase/DefaultShowcase.scss @@ -22,6 +22,8 @@ &__extra-content { word-wrap: break-word; + margin: 20px 0; + padding: 0 10px; } &__content-item { diff --git a/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.scss b/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.scss index 0d3a70bc07..4b771cacaf 100644 --- a/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.scss +++ b/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.scss @@ -5,4 +5,9 @@ &__show-btn { width: max-content; } + + &__menu { + margin: 10px 0; + padding: 5px 0; + } } diff --git a/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.stories.tsx b/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.stories.tsx index f21cae7d95..8462ddc7c8 100644 --- a/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.stories.tsx +++ b/src/components/Sheet/__stories__/WithMenuShowcase/WithMenuShowcase.stories.tsx @@ -19,23 +19,25 @@ export default { export const WithMenuShowcase: StoryFn = (args: SheetProps) => { const [visible, setVisible] = React.useState(false); + const generateMenuItems = () => { + return Array.from({length: 50}, (_, index) => { + return menu item 2.{index}; + }); + }; + return (
setVisible(false)}> - + menu item 1.1 menu item 1.2 menu item 1.3 - - menu item 2.1 - menu item 2.2 - menu item 2.3 - + {generateMenuItems()}