UNPKG

jsx-slack

Version:

Build JSON object for Slack Block Kit surfaces from JSX

40 lines (39 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 DatePickerBaseProps extends ActionProps, AutoFocusibleProps, ConfirmableProps { children?: never; /** The placeholder text shown in empty date picker field. */ placeholder?: string; /** * An initially selected date. * * It accepts `YYYY-MM-DD` formatted string, UNIX timestamp _in millisecond_, * and JavaScript `Date` instance. */ initialDate?: string | number | Date; /** An alias into `initialDate` prop. */ value?: string | number | Date; } export type DatePickerProps = InputComponentProps<DatePickerBaseProps>; /** * The interactive component or input component for * [the `datepicker` element](https://api.slack.com/reference/block-kit/block-elements#datepicker). * * It makes easy to select a date through the calendar interface. * * @example * ```jsx * <Blocks> * <Actions> * <DatePicker actionId="date_picker" initialDate={new Date()} /> * </Actions> * </Blocks> * ``` * * @return The partial JSON of a block element for date picker, or `input` * layout block with it */ export declare const DatePicker: BuiltInComponent<DatePickerProps>; export {};