Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-props-variation-overflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/fuselage": patch
---

fix(fuselage): wrap PropsVariation table to prevent mobile overflow
73 changes: 41 additions & 32 deletions packages/fuselage/.storybook/PropsVariation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,51 @@ function PropsVariation({
}) {
return (
<Box
is='table'
marginBlock={16}
marginInline='auto'
style={{ borderCollapse: 'collapse' }}
overflowX='auto'
style={{ WebkitOverflowScrolling: 'touch', maxWidth: '100%' }}
>
<Box is='thead'>
<Box is='tr'>
<Box is='th' />
{Object.keys(xAxis).map((xVariation, key) => (
<Box key={key} is='th' color='hint' fontScale='c1'>
{xVariation}
</Box>
))}
</Box>
</Box>
<Box is='tbody'>
{Object.entries(yAxis).map(([yVariation, yProps], y) => (
<Box key={y} is='tr'>
<Box is='th' color='hint' fontScale='c1'>
{yVariation}
</Box>
{Object.values(xAxis).map((xProps, x) => (
<Box
key={x}
is='td'
margin='none'
paddingBlock={8}
paddingInline={16}
>
<Box display='flex' alignItems='center' justifyContent='center'>
<Component {...common} {...xProps} {...yProps} />
</Box>
<Box
is='table'
marginBlock={16}
marginInline='auto'
style={{ borderCollapse: 'collapse' }}
>
<Box is='thead'>
<Box is='tr'>
<Box is='th' />
{Object.keys(xAxis).map((xVariation, key) => (
<Box key={key} is='th' color='hint' fontScale='c1'>
{xVariation}
</Box>
))}
</Box>
))}
</Box>
<Box is='tbody'>
{Object.entries(yAxis).map(([yVariation, yProps], y) => (
<Box key={y} is='tr'>
<Box is='th' color='hint' fontScale='c1'>
{yVariation}
</Box>
{Object.values(xAxis).map((xProps, x) => (
<Box
key={x}
is='td'
margin='none'
paddingBlock={8}
paddingInline={16}
>
<Box
display='flex'
alignItems='center'
justifyContent='center'
>
<Component {...common} {...xProps} {...yProps} />
</Box>
</Box>
))}
</Box>
))}
</Box>
</Box>
</Box>
);
Expand Down