@redis-ui/styles 21.15.0 → 21.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,7 +85,12 @@ const Panel = styled.div`
|
|
|
85
85
|
background: ${({ theme }) => theme.semantic.color.background.neutral100};
|
|
86
86
|
`;
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
// useTheme is a hook: call it inside a component or custom hook
|
|
89
|
+
const ModeLabel = () => {
|
|
90
|
+
const { mode } = useTheme(); // 'light' | 'dark'
|
|
91
|
+
|
|
92
|
+
return <span>Current mode: {mode}</span>;
|
|
93
|
+
};
|
|
89
94
|
```
|
|
90
95
|
|
|
91
96
|
Use tokens instead of hard-coded values, so your UI follows both themes and both modes.
|