Add TextButton widget (#321)

This commit is contained in:
Keavon Chambers
2021-07-31 04:58:25 -07:00
parent e1ac2a85b3
commit 1c317d0166
5 changed files with 101 additions and 6 deletions
@@ -2,6 +2,24 @@ export type Widgets = IconButtonWidget | SeparatorWidget | PopoverButtonWidget |
export type WidgetRow = Array<Widgets>;
export type WidgetLayout = Array<WidgetRow>;
// Text Button
export interface TextButtonWidget {
kind: "TextButton";
tooltip?: string;
message?: string | object;
callback?: Function;
props: TextButtonProps;
}
export interface TextButtonProps {
// `action` is used via `IconButtonWidget.callback`
label: string;
emphasized?: boolean;
disabled?: boolean;
minWidth?: number;
gapAfter?: boolean;
}
// Icon Button
export interface IconButtonWidget {
kind: "IconButton";