Skip to content

Commit

Permalink
add typings for timepicker (#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
YussufElarif committed Aug 20, 2023
1 parent 6d23725 commit 6ab1493
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/types/actions/block-action.ts
Expand Up @@ -21,6 +21,7 @@ export type BlockElementAction =
| MultiExternalSelectAction
| OverflowAction
| DatepickerAction
| TimepickerAction
| RadioButtonsAction
| CheckboxesAction
| PlainTextInputAction;
Expand Down Expand Up @@ -177,6 +178,16 @@ export interface DatepickerAction extends BasicElementAction<'datepicker'> {
confirm?: Confirmation;
}

/**
* An action from a time picker element
*/
export interface TimepickerAction extends BasicElementAction<'timepicker'> {
selected_time: string | null;
initial_time?: string;
placeholder?: PlainTextElement;
confirm?: Confirmation;
}

/**
* An action from a radio button element
*/
Expand Down Expand Up @@ -276,6 +287,7 @@ export type BlockChannelsSelectAction = BlockAction<ChannelsSelectAction>;
export type BlockExternalSelectAction = BlockAction<ExternalSelectAction>;
export type BlockOverflowAction = BlockAction<OverflowAction>;
export type BlockDatepickerAction = BlockAction<DatepickerAction>;
export type BlockTimepickerAction = BlockAction<TimepickerAction>;
export type BlockRadioButtonsAction = BlockAction<RadioButtonsAction>;
export type BlockCheckboxesAction = BlockAction<CheckboxesAction>;
export type BlockPlainTextInputAction = BlockAction<PlainTextInputAction>;

0 comments on commit 6ab1493

Please sign in to comment.