Skip to content

Commit

Permalink
docs: update code example to use correct API usage
Browse files Browse the repository at this point in the history
Existing code example is invalid. Added a `root` block inside the styleOverrides to fix it

Signed-off-by: Pubudu Dodangoda <[email protected]>
  • Loading branch information
pupudu authored Jan 8, 2023
1 parent 612db95 commit c21b8a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/data/joy/customization/approaches/approaches.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ const theme = extendTheme({
components: {
// The component identifier always start with `Joy${ComponentName}`.
JoyButton: {
styleOverrides: ({ theme }) => ({
// theme.vars.* return the CSS variables.
fontSize: theme.vars.fontSize.lg, // 'var(--joy-fontSize-lg)'
}),
styleOverrides: {
root: ({theme}) => {
// theme.vars.* return the CSS variables.
fontSize: theme.vars.fontSize.lg, // 'var(--joy-fontSize-lg)'
},
},
},
},
});
Expand Down

0 comments on commit c21b8a8

Please sign in to comment.