UNPKG

jsx-slack

Version:

Build JSON object for Slack Block Kit surfaces from JSX

41 lines (40 loc) 1.46 kB
import { BuiltInComponent } from '../../jsx-internals'; import { ConfirmableProps } from '../composition/Confirm'; import { InputComponentProps } from '../layout/Input'; import { ActionProps, AutoFocusibleProps } from './utils'; interface TimePickerBaseProps extends ActionProps, AutoFocusibleProps, ConfirmableProps { children?: never; /** The placeholder text shown in empty time picker field. */ placeholder?: string; /** * An initially selected time. * * It accepts `HH:mm` formatted string, and a value that points out designated * datetime: UNIX timestamp _in millisecond_ or JavaScript `Date` instance. */ initialTime?: string | number | Date; /** An alias into `initialTime` prop. */ value?: string | number | Date; } export type TimePickerProps = InputComponentProps<TimePickerBaseProps>; /** * The interactive component or input component for * [the `timepicker` element](https://api.slack.com/reference/block-kit/block-elements#timepicker). * * It makes easy to select the specific time through a dropdown or a native * interface suited to the device. * * @example * ```jsx * <Blocks> * <Actions> * <TimePicker actionId="time_picker" initialTime="12:34" /> * </Actions> * </Blocks> * ``` * * @return The partial JSON of a block element for time picker, or `input` * layout block with it */ export declare const TimePicker: BuiltInComponent<TimePickerProps>; export {};