From e62c41f6d1a8da972f12f0efddaa87f607692065 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Thu, 4 Apr 2024 11:01:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ternary-dark-mode):=20export?= =?UTF-8?q?=20type=20restore=20(#569=20by=20@soullivaneuh)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/heavy-rats-juggle.md | 5 +++++ .../src/useTernaryDarkMode/useTernaryDarkMode.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/heavy-rats-juggle.md diff --git a/.changeset/heavy-rats-juggle.md b/.changeset/heavy-rats-juggle.md new file mode 100644 index 00000000..92af83d4 --- /dev/null +++ b/.changeset/heavy-rats-juggle.md @@ -0,0 +1,5 @@ +--- +"usehooks-ts": patch +--- + +Restoration of the useTernaryDarkMode related types diff --git a/packages/usehooks-ts/src/useTernaryDarkMode/useTernaryDarkMode.ts b/packages/usehooks-ts/src/useTernaryDarkMode/useTernaryDarkMode.ts index 454f596a..baafc169 100644 --- a/packages/usehooks-ts/src/useTernaryDarkMode/useTernaryDarkMode.ts +++ b/packages/usehooks-ts/src/useTernaryDarkMode/useTernaryDarkMode.ts @@ -7,10 +7,10 @@ const COLOR_SCHEME_QUERY = '(prefers-color-scheme: dark)' const LOCAL_STORAGE_KEY = 'usehooks-ts-ternary-dark-mode' /** Ternary dark mode options. */ -type TernaryDarkMode = 'system' | 'dark' | 'light' +export type TernaryDarkMode = 'system' | 'dark' | 'light' /** Options for the `useTernaryDarkMode` hook. */ -type TernaryDarkModeOptions = { +export type TernaryDarkModeOptions = { /** * The default value for the dark mode. * @default 'system' @@ -29,7 +29,7 @@ type TernaryDarkModeOptions = { } /** Represents the return type of the `useTernaryDarkMode` hook. */ -type TernaryDarkModeReturn = { +export type TernaryDarkModeReturn = { /** The current state of the dark mode. */ isDarkMode: boolean /** The current state of the dark mode. */