mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
Previous commit was removing margin-left: 0
style. This revert back this change and add more consistencies with the `navStore` and classes.
This commit is contained in:
parent
e9501be58a
commit
717d6d88de
3 changed files with 26 additions and 2 deletions
|
@ -35,7 +35,9 @@
|
|||
import {
|
||||
shouldRenderHamburgerMenu,
|
||||
isSideNavCollapsed,
|
||||
isSideNavFixed,
|
||||
isSideNavRail,
|
||||
isSideNavExpanded,
|
||||
} from "./navStore";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
@ -43,7 +45,9 @@
|
|||
let winWidth = undefined;
|
||||
|
||||
$: dispatch(isOpen ? "open" : "close");
|
||||
$: $isSideNavCollapsed = !isOpen;
|
||||
$: $isSideNavExpanded = !rail && winWidth >= expansionBreakpoint;
|
||||
$: $isSideNavCollapsed = !$isSideNavExpanded;
|
||||
$: $isSideNavFixed = !rail & isOpen;
|
||||
$: $isSideNavRail = rail;
|
||||
|
||||
onMount(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue