UNPKG

react-night-light

Version:

A React component that simulates a night light with pull-to-toggle functionality

17 lines (16 loc) 638 B
import React from "react"; export type Props = { isOn?: boolean; onToggle?: (state: boolean) => void; wireColor?: string; maxPullDistance?: number; initialWireLength?: number; className?: string; ref?: React.Ref<HTMLDivElement>; }; /** * NightLight - A React component that simulates a night light with pull-to-toggle functionality * * This component uses React 19's direct ref approach, where ref is passed as a prop. */ export declare function NightLight({ isOn: controlledIsOn, onToggle, wireColor, maxPullDistance, initialWireLength, className, ref, }: Props): import("react/jsx-runtime").JSX.Element;