Skip to content

Commit

Permalink
fix: SidePanel overflow-y issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MildTomato committed Feb 14, 2022
1 parent f9e8058 commit 02efd17
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
57 changes: 57 additions & 0 deletions src/components/SidePanel/SidePanel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,58 @@ export const nestedSidepanels = (args: any) => {
)
}

export const longContent = (args: any) => (
<>
<SidePanel {...args}>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
<p className="text-scale-900">This is a paragraph</p>
</SidePanel>
</>
)

Default.args = {
visible: true,
onCancel: action('onCancel'),
Expand Down Expand Up @@ -202,3 +254,8 @@ triggerElement.args = {
description: 'And i am the description',
triggerElement: <Button as="span">Open</Button>,
}

longContent.args = {
visible: true,
header: 'Long content',
}
1 change: 1 addition & 0 deletions src/lib/theme/defaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ export default {
`,
content: `
relative flex-1 px-4 sm:px-6 py-4
overflow-y-auto
`,
footer: `
flex justify-end gap-2
Expand Down

0 comments on commit 02efd17

Please sign in to comment.