UNPKG

jsx-slack

Version:

Build JSON object for Slack Block Kit surfaces from JSX

38 lines (37 loc) 1.38 kB
import { BuiltInComponent } from '../../jsx-internals'; import { ConfirmableProps } from '../composition/Confirm'; import { InputComponentProps } from '../layout/Input'; import { ActionProps, AutoFocusibleProps } from './utils'; interface DateTimePickerBaseProps extends ActionProps, AutoFocusibleProps, ConfirmableProps { children?: never; /** * An initially selected date and time. * * It accepts a formatted string with ISO 8601 (`YYYY-MM-DDTHH:mm:ss.sssZ`), * UNIX timestamp _in millisecond_, and JavaScript `Date` instance. */ initialDateTime?: string | number | Date; /** An alias into `initialDate` prop. */ value?: string | number | Date; } export type DateTimePickerProps = InputComponentProps<DateTimePickerBaseProps>; /** * The interactive component or input component for * [the `datetimepicker` element](https://api.slack.com/reference/block-kit/block-elements#datetimepicker). * * Users can pick a specific date and specific time at the same time. * * @example * ```jsx * <Blocks> * <Actions> * <DateTimePicker actionId="date_time_picker" initialDate={new Date()} /> * </Actions> * </Blocks> * ``` * * @return The partial JSON of a block element for date time picker, or `input` * layout block with it */ export declare const DateTimePicker: BuiltInComponent<DateTimePickerProps>; export {};