Skip to content

Commit

Permalink
feat(styles): add navigation style (#180)
Browse files Browse the repository at this point in the history
Note: we need to use both this style and Tab style to create a
navigation component in each application. Also make sure that you use
"large" size TabList.
  • Loading branch information
boilund authored Feb 2, 2024
1 parent c914a5f commit c898f87
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions styles/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./navigation/navigation.styles";
export * from "./static/static.styles";
export * from "./tab-list/tab-list.styles";
export * from "./tab-list/tab.styles";
Expand Down
36 changes: 36 additions & 0 deletions styles/src/navigation/navigation.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { makeStyles, shorthands, tokens } from "@fluentui/react-components";

/**
* How to use:
* ```
* <div className={navStyles.container}>
* <TabList
* className={navStyles.tabList}
* size="large"
* vertical
* >
* <Tab />
* <Tab />
* <div className={navStyles.spacer}/>
* <Tab />
* </TabList>
* </div>
* ```
*/
export const useNavigationStyles = makeStyles({
container: {
...shorthands.padding(
tokens.spacingVerticalXXL,
tokens.spacingHorizontalS,
tokens.spacingVerticalL
),
backgroundColor: tokens.colorNeutralBackground4,
},
spacer: {
flexGrow: 1,
},
tabList: {
height: "100%",
rowGap: tokens.spacingVerticalXS,
},
});

0 comments on commit c898f87

Please sign in to comment.