Skip to content

Commit

Permalink
feat(react-nav-preview): Set Nav drawer background color (microsoft#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
mltejera committed Apr 29, 2024
1 parent 37bf5ae commit 41f064d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { makeStyles, mergeClasses } from '@griffel/react';
import type { InlineDrawerSlots } from '@fluentui/react-drawer';
import type { SlotClassNames } from '@fluentui/react-utilities';
import type { NavDrawerState } from './NavDrawer.types';
import { navItemTokens } from '../sharedNavStyles.styles';

export const navDrawerClassNames: SlotClassNames<InlineDrawerSlots> = {
root: 'fui-NavDrawer',
Expand All @@ -13,6 +14,7 @@ export const navDrawerClassNames: SlotClassNames<InlineDrawerSlots> = {
const useStyles = makeStyles({
root: {
width: '260px', // per spec
backgroundColor: navItemTokens.backgroundColor,
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export const navItemTokens = {
indicatorOffset: 18,
indicatorWidth: 4,
indicatorHeight: 20,
backgroundColor: tokens.colorNeutralBackground4,
backgroundColorHover: tokens.colorNeutralBackground4Hover,
backgroundColorPressed: tokens.colorNeutralBackground4Pressed,
};

/**
Expand All @@ -21,17 +24,17 @@ export const useRootDefaultClassName = makeResetStyles({
justifyContent: 'start',
gap: tokens.spacingVerticalL,
padding: tokens.spacingVerticalMNudge,
backgroundColor: tokens.colorNeutralBackground4,
backgroundColor: navItemTokens.backgroundColor,
borderRadius: tokens.borderRadiusMedium,
color: tokens.colorNeutralForeground2,
textDecorationLine: 'none',
border: 'none',
...typographyStyles.body1,
':hover': {
backgroundColor: tokens.colorNeutralBackground4Hover,
backgroundColor: navItemTokens.backgroundColorHover,
},
':active': {
backgroundColor: tokens.colorNeutralBackground4Pressed,
backgroundColor: navItemTokens.backgroundColorPressed,
},
});

Expand Down

0 comments on commit 41f064d

Please sign in to comment.