UNPKG

@teamsparta/stack-core

Version:
19 lines (16 loc) 751 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ThemeName } from '@teamsparta/stack-tokens'; import { PropsWithChildren } from 'react'; type ThemeContext = { theme: ThemeName; }; interface StackThemeProviderProps { theme?: ThemeName; } declare const useThemeContext: (consumerName: string) => ThemeContext; /** * @description ThemeContext를 생성하는 Provider와 useContext를 반환합니다. * 디자인 시스템에서 Theme을 주입받기 위해 사용합니다. */ declare function StackThemeProvider({ children, theme: modeFromProps, }: PropsWithChildren<StackThemeProviderProps>): react_jsx_runtime.JSX.Element; export { StackThemeProvider, type StackThemeProviderProps, type ThemeContext, useThemeContext };