From 330b4fc2628676cf3956279534cd5969c3807daf Mon Sep 17 00:00:00 2001 From: Yussuf Elarif Date: Sun, 20 Aug 2023 00:34:21 +0100 Subject: [PATCH] add typings for timepicker --- src/types/actions/block-action.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/types/actions/block-action.ts b/src/types/actions/block-action.ts index fc12aeca4..98d73e318 100644 --- a/src/types/actions/block-action.ts +++ b/src/types/actions/block-action.ts @@ -21,6 +21,7 @@ export type BlockElementAction = | MultiExternalSelectAction | OverflowAction | DatepickerAction + | TimepickerAction | RadioButtonsAction | CheckboxesAction | PlainTextInputAction; @@ -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 */ @@ -276,6 +287,7 @@ export type BlockChannelsSelectAction = BlockAction; export type BlockExternalSelectAction = BlockAction; export type BlockOverflowAction = BlockAction; export type BlockDatepickerAction = BlockAction; +export type BlockTimepickerAction = BlockAction; export type BlockRadioButtonsAction = BlockAction; export type BlockCheckboxesAction = BlockAction; export type BlockPlainTextInputAction = BlockAction;