Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add typings for timepicker #1928

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/types/actions/block-action.ts
Original file line number Diff line number Diff line change
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>;