Skip to content

Commit

Permalink
Merge pull request #81 from shapehq/bugfix/expand-collapse-mobile-too…
Browse files Browse the repository at this point in the history
…lbar-on-desktop

Hides expand/collapse mobile toolbar on desktop
  • Loading branch information
simonbs authored Oct 27, 2023
2 parents bed09b4 + 51a20fe commit 4470eec
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/features/sidebar/view/base/responsive/SecondaryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export default function ResponsiveSecondaryHeader({
<Stack direction="row" alignItems="center">
{trailingItem}
{mobileToolbar &&
<IconButton edge="end" onClick={() => onToggleMobileToolbar(!showMobileToolbar) }>
<IconButton
edge="end"
onClick={() => onToggleMobileToolbar(!showMobileToolbar) }
sx={{ display: { sm: "block", md: "none" } }}
>
<ExpandCircleDownIcon sx={{
transform: showMobileToolbar ? "rotate(180deg)" : "none" }}
/>
Expand All @@ -41,7 +45,11 @@ export default function ResponsiveSecondaryHeader({
>
{mobileToolbar &&
<Collapse in={showMobileToolbar} >
<Box sx={{ padding: 2, paddingTop: 0, display: { sm: "block", md: "none" } }}>
<Box sx={{
padding: 2,
paddingTop: 0,
display: { sm: "block", md: "none" }
}}>
{mobileToolbar}
</Box>
</Collapse>
Expand Down

0 comments on commit 4470eec

Please sign in to comment.