This hook allows you to access the theme context and use the theme values.
The value change when the theme is changed.
You can install this package using npm, yarn, or pnpm.
npm install @pikas-ui/stylesyarn add @pikas-ui/stylespnpm add @pikas-ui/stylesimport { useTheme } from '@pikas-ui/styles';
const Example: React.FC = () => {
const useTheme = useTheme();
return (
<h1
style={{
color: useTheme.colors.primary,
}}
>
Example
</h1>
);
};
This documentation can be edited on GitHub here