-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: creates TreeItem styles * chore: hoist appearance and size from item to parent * feat: uses css variables to provide only level dynamically * Update packages/react-components/react-tree/src/components/TreeItem/useTreeItemStyles.ts Co-authored-by: Sean Monahan <[email protected]> * fix: updates snapshots * feat: adds badges slots * chore: switch from stop propagation to preventing default Co-authored-by: Bernardo Sunderhus <[email protected]> Co-authored-by: Sean Monahan <[email protected]>
- Loading branch information
1 parent
2d76331
commit 68c1cd9
Showing
21 changed files
with
617 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
packages/react-components/react-tree/src/components/Tree/useTreeStyles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
import { mergeClasses } from '@griffel/react'; | ||
import { makeStyles, mergeClasses } from '@griffel/react'; | ||
import type { TreeSlots, TreeState } from './Tree.types'; | ||
import type { SlotClassNames } from '@fluentui/react-utilities'; | ||
import { tokens } from '@fluentui/react-theme'; | ||
|
||
export const treeClassNames: SlotClassNames<TreeSlots> = { | ||
root: 'fui-Tree', | ||
}; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
rowGap: tokens.spacingVerticalXXS, | ||
}, | ||
}); | ||
|
||
export const useTreeStyles_unstable = (state: TreeState): TreeState => { | ||
state.root.className = mergeClasses(treeClassNames.root, state.root.className); | ||
const styles = useStyles(); | ||
state.root.className = mergeClasses(treeClassNames.root, styles.root, state.root.className); | ||
|
||
return state; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.