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/styles
yarn add @pikas-ui/styles
pnpm add @pikas-ui/styles
import { 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