@zenithui/time-picker
Version:
A ZenithUi Time Picker is React component enables users to select a time from a predefined list of options.
42 lines (41 loc) • 1.55 kB
TypeScript
import * as React from "react";
type ToggleGroupType = "single" | "multiple";
/**
* The root component for the toggle group. It provides the context for the toggle group items.
*/
interface ToggleGroupRootProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* The type of the toggle group.
* @default "single"
*/
type: ToggleGroupType;
/**
* The controlled stateful value of the items that are pressed.
*/
value?: string | string[];
/**
* The value of the items that are pressed when initially rendered. Use
* `defaultValue` if you do not need to control the state of a toggle group.
*/
defaultValue?: string | string[];
/**
* The callback that fires when the state of the toggle group changes.
*/
onValueChange?: (value: string | string[]) => void;
/**
* The children of the toggle group.
*/
children: React.ReactNode;
}
declare const ToggleGroupRoot: React.ForwardRefExoticComponent<ToggleGroupRootProps & React.RefAttributes<HTMLDivElement>>;
/**
* The item component for the toggle group. It must be used within a ToggleGroupRoot.
*/
interface ToggleGroupItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/**
* A string value for the toggle group item. All items within a toggle group should use a unique value.
*/
value: string;
}
declare const ToggleGroupItem: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
export { ToggleGroupRoot, ToggleGroupItem };