useTheme

This hook allows you to access the theme context and use the theme values.

The value change when the theme is changed.

Installation

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

Usage

import { useTheme } from '@pikas-ui/styles';

const Example: React.FC = () => {
  const useTheme = useTheme();

  return (
    <h1
      style={{
        color: useTheme.colors.primary,
      }}
    >
      Example
    </h1>
  );
};

Contributing

This documentation can be edited on GitHub here