web: full SmallDialog component, one flexible meowbalt component
- fully stylized small dialog: header, title, subtext, state without meowbalt - moved meowbalt into his own adaptive component, no need to import/create new ones for each emotion - better types for dialog related stuff - type for meowbalt's emotions - better padding in small dialog
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { MeowbaltEmotions } from "$lib/types/meowbalt";
|
||||
|
||||
export type DialogButton = {
|
||||
text: string,
|
||||
color: string,
|
||||
color: "blue" | "red" | "default",
|
||||
main: boolean,
|
||||
action: () => unknown | Promise<unknown>
|
||||
}
|
||||
@@ -8,7 +10,7 @@ export type DialogButton = {
|
||||
export type DialogInfo = {
|
||||
id: string,
|
||||
type: "small",
|
||||
meowbalt: "error",
|
||||
meowbalt: MeowbaltEmotions | "",
|
||||
title: string,
|
||||
bodyText: string,
|
||||
bodySubText: string,
|
||||
|
||||
1
web/src/lib/types/meowbalt.ts
Normal file
1
web/src/lib/types/meowbalt.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type MeowbaltEmotions = "smile" | "error" | "question" | "think";
|
||||
Reference in New Issue
Block a user