Home / File/ use-themes-config.ts — ui Source File

use-themes-config.ts — ui Source File

Architecture documentation for use-themes-config.ts, a typescript file in the ui codebase. 3 imports, 0 dependents.

File typescript ComponentRegistry Styles 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  e191c207_673e_f94d_c1b7_8ab1e1596119["use-themes-config.ts"]
  cba8a664_3253_9b8c_8abe_9f0e33bbc037["jotai"]
  e191c207_673e_f94d_c1b7_8ab1e1596119 --> cba8a664_3253_9b8c_8abe_9f0e33bbc037
  68f194ce_9060_f5f9_d266_dd66c3d544fb["utils"]
  e191c207_673e_f94d_c1b7_8ab1e1596119 --> 68f194ce_9060_f5f9_d266_dd66c3d544fb
  051af7df_a60b_d4df_95ed_ca045420060f["themes"]
  e191c207_673e_f94d_c1b7_8ab1e1596119 --> 051af7df_a60b_d4df_95ed_ca045420060f
  style e191c207_673e_f94d_c1b7_8ab1e1596119 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"

import { THEMES, Theme } from "@/lib/themes"

type ThemesConfig = {
  activeTheme: Theme
}

const configAtom = atomWithStorage<ThemesConfig>("themes:config2", {
  activeTheme: THEMES[0],
})

export function useThemesConfig() {
  const [themesConfig, setThemesConfig] = useAtom(configAtom)

  return { themesConfig, setThemesConfig }
}

Subdomains

Functions

Types

Dependencies

  • jotai
  • themes
  • utils

Frequently Asked Questions

What does use-themes-config.ts do?
use-themes-config.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in use-themes-config.ts?
use-themes-config.ts defines 1 function(s): useThemesConfig.
What does use-themes-config.ts depend on?
use-themes-config.ts imports 3 module(s): jotai, themes, utils.
Where is use-themes-config.ts in the architecture?
use-themes-config.ts is located at deprecated/www/hooks/use-themes-config.ts (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/hooks).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free