Skip to content

Commit

Permalink
Truncate story name on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
cdedreuille committed Oct 4, 2023
1 parent c6760e7 commit 2c52f49
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const MobileNavigation: FC<MobileNavigationProps> = ({ menu, panel, showP
<MobileAddonsDrawer>{panel}</MobileAddonsDrawer>
<Button onClick={() => setMobileMenuOpen(!isMobileMenuOpen)} title="Open navigation menu">
<Icons icon="menu" />
{fullStoryName}
<p>{fullStoryName}</p>
</Button>
{showPanel && (
<DrawerIconButton onClick={() => setMobilePanelOpen(true)} title="Open addon panel">
Expand Down Expand Up @@ -86,4 +86,18 @@ const Button = styled.button(({ theme }) => ({
fontSize: `${theme.typography.size.s2 - 1}px`,
padding: '0 7px',
fontWeight: theme.typography.weight.bold,
WebkitLineClamp: 1,

'> svg': {
width: 14,
height: 14,
flexShrink: 0,
},

'> p': {
display: '-webkit-box',
WebkitLineClamp: 1,
WebkitBoxOrient: 'vertical',
overflow: 'hidden',
},
}));

0 comments on commit 2c52f49

Please sign in to comment.