aboutsummaryrefslogtreecommitdiffstats
path: root/src/types
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-28 17:12:58 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:15:27 +0100
commit60c49f18389ff625177a57277ef8f292a31097bf (patch)
tree76b0f1f1792b57659e54d282f93df70088446e3c /src/types
parent05f1dfc6896d3affa7c494a1b955f230d836a4b7 (diff)
refactor(providers,hooks): rewrite PrismThemeProvider & usePrismTheme
* reuse Theme provider logic * move DOM mutation from provider to hook * add a script to init theme before page load
Diffstat (limited to 'src/types')
-rw-r--r--src/types/app.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types/app.ts b/src/types/app.ts
index 565fe97..2588a7b 100644
--- a/src/types/app.ts
+++ b/src/types/app.ts
@@ -2,6 +2,7 @@ import type { NextPage } from 'next';
import type { AppProps as NextAppProps } from 'next/app';
import type { ReactElement, ReactNode } from 'react';
import type { MessageFormatElement } from 'react-intl';
+import type { VALID_THEMES } from '../utils/constants';
export type NextPageWithLayoutOptions = {
withExtraPadding?: boolean;
@@ -139,3 +140,5 @@ export type Spacing = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
export type Validator<T> = (value: unknown) => value is T;
export type AckeeTrackerValue = 'full' | 'partial';
+
+export type Theme = (typeof VALID_THEMES)[number];