From 6ab1493667f236f035d7447225b576a55b008b97 Mon Sep 17 00:00:00 2001 From: Yussuf Elarif <9627828+YussufElarif@users.noreply.github.com> Date: Mon, 21 Aug 2023 00:59:22 +0100 Subject: [PATCH] add typings for timepicker (#1928) --- 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;