Skip to content

Commit

Permalink
fix: convert object into function
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmoura committed Sep 25, 2023
1 parent da528ba commit 3cabfc3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
import { tokens } from '@fluentui/react-theme';

import type { DrawerInlineSlots, DrawerInlineState } from './DrawerInline.types';
import {
drawerCSSVars,
getDrawerDefaultStyles,
useDrawerBaseClassNames,
} from '../../shared/useDrawerBaseStyles.styles';
import { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';

export const drawerInlineClassNames: SlotClassNames<DrawerInlineSlots> = {
root: 'fui-DrawerInline',
};

const useDrawerResetStyles = makeResetStyles({
...getDrawerDefaultStyles(),
...drawerDefaultStyles,
position: 'relative',
opacity: 0,
transitionProperty: 'opacity, transform',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
import type { DrawerOverlaySlots, DrawerOverlayState } from './DrawerOverlay.types';
import {
drawerCSSVars,
getDrawerDefaultStyles,
drawerDefaultStyles,
useDrawerBaseClassNames,
useDrawerDurationStyles,
} from '../../shared/useDrawerBaseStyles.styles';
Expand All @@ -21,7 +21,7 @@ export const drawerOverlayClassNames: Omit<SlotClassNames<DrawerOverlaySlots>, '
*/
const useDrawerRootStyles = makeStyles({
root: {
...getDrawerDefaultStyles(),
...drawerDefaultStyles,
position: 'fixed',
top: 0,
bottom: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const drawerCSSVars = {
/**
* Default shared styles for the Drawer component
*/
export const getDrawerDefaultStyles = (): GriffelStyle => ({
export const drawerDefaultStyles: GriffelStyle = {
...shorthands.padding(0),
...shorthands.overflow('hidden'),
...shorthands.borderRadius(0),
Expand All @@ -28,7 +28,7 @@ export const getDrawerDefaultStyles = (): GriffelStyle => ({
alignItems: 'flex-start',
justifyContent: 'flex-start',
backgroundColor: tokens.colorNeutralBackground1,
});
};

/**
* Shared dynamic styles for the Drawer component
Expand Down

0 comments on commit 3cabfc3

Please sign in to comment.