UNPKG

@tempots/ui

Version:

Provides a higher level of renderables to help fast development with Tempo.

32 lines (31 loc) 1.16 kB
import { Signal, Provider } from '@tempots/dom'; /** * Defines the possible appearance types for the application. * * @public */ export type AppearanceType = 'light' | 'dark'; /** * A provider that provides a child component with an appearance context, which can be used to * determine the current appearance (light or dark) based on the user's system * preferences. * * The appearance context is updated whenever the user's system preferences * change, and the component is cleaned up when it is no longer needed. * * @param child - The child component to be provided with the appearance context. * @returns The child component with the appearance context. * @public */ export declare const Appearance: Provider<Signal<AppearanceType>>; /** * Creates a signal that represents the current appearance (light or dark) based on the user's system * preferences. * * The appearance is updated whenever the user's system preferences change, and the signal is cleaned * up when it is no longer needed. * * @returns A signal representing the current appearance. * @public */ export declare function useAppearance(): Signal<AppearanceType>;