You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Theme: Fix ThemeProvider documentation for accurate color prop (#72943)
* theme: Fix ThemeProvider documentation for accurate color prop
* Expand on what ThemeProvider actually does
Co-authored-by: aduth <[email protected]>
Co-authored-by: nerrad <[email protected]>
Co-authored-by: tyxla <[email protected]>
Copy file name to clipboardExpand all lines: packages/theme/README.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,33 +63,41 @@ The design system defines color tokens using the following naming scheme:
63
63
64
64
## Theme Provider
65
65
66
-
The `ThemeProvider` is a React component that should wrap your application to provide design tokens and theme context to the child UI components.
66
+
The `ThemeProvider` is a React component that should wrap your application to provide design tokens and theme context to the child UI components. It accepts a set of customizable seed values and automatically generates a set of design tokens, which are exposed as CSS custom properties for use throughout the application.
The `color` prop accepts an object with the following optional properties:
81
+
82
+
-`primary`: The primary/accent seed color (default: `'#3858e9'`)
83
+
-`bg`: The background seed color (default: `'#f8f8f8'`)
84
+
85
+
Both properties accept any valid CSS color value. The theme system automatically generates appropriate color ramps and determines light/dark mode based on these seed colors.
86
+
87
+
### Nesting Providers
88
+
80
89
The provider can be used recursively to override or modify the theme for a specific subtree.
0 commit comments