react-slottable
Version:
Package that allows to turn react components into slottable ones
13 lines (12 loc) • 341 B
TypeScript
import { Dispatch, SetStateAction } from 'react';
type UseBooleanReturnType = [
boolean,
{
setValue: Dispatch<SetStateAction<boolean>>;
toggle: () => void;
on: () => void;
off: () => void;
}
];
declare const useBoolean: (initialValue?: boolean) => UseBooleanReturnType;
export default useBoolean;