24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
import { atomWithRefresh } from 'jotai/utils';
|
|
|
|
export const PrimaryColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-primary').trim(),
|
|
);
|
|
export const SecondaryColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-secondary').trim(),
|
|
);
|
|
export const TeritaryColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-tertiary').trim(),
|
|
);
|
|
export const ErrorColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-error').trim(),
|
|
);
|
|
export const GentleColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-gentle').trim(),
|
|
);
|
|
export const AggressiveColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-aggressive').trim(),
|
|
);
|
|
export const DefensiveColorAtom = atomWithRefresh(() =>
|
|
window.getComputedStyle(document.documentElement).getPropertyValue('--color-defensive').trim(),
|
|
);
|