From e1716c3e6141e8af30c9eb846a4262fa0e9a0529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20T=C3=A4kker?= Date: Fri, 5 Dec 2025 02:34:58 +0100 Subject: [PATCH] Add new UI components: Card and Checkbox; enhance Input and Button with additional props --- app/styles/_variables.scss | 1 + app/styles/global.scss | 1 + app/ui/Button.vue | 11 +++- app/ui/Card.vue | 23 ++++++++ app/ui/Checkbox.vue | 116 +++++++++++++++++++++++++++++++++++++ app/ui/Input.vue | 68 +++++++++++++++++----- 6 files changed, 205 insertions(+), 15 deletions(-) create mode 100644 app/ui/Card.vue create mode 100644 app/ui/Checkbox.vue diff --git a/app/styles/_variables.scss b/app/styles/_variables.scss index a90654b..8cb30c7 100644 --- a/app/styles/_variables.scss +++ b/app/styles/_variables.scss @@ -5,5 +5,6 @@ $color-placeholder-text: rgba(255, 255, 255, 0.44); $color-border: rgba(255, 255, 255, 0.16); $color-button: rgba(255, 255, 255, 0.08); $color-button-hover: rgba(255, 255, 255, 0.16); +$color-attention: #fc8181; $standard-border-radius: 0.3rem; diff --git a/app/styles/global.scss b/app/styles/global.scss index 9f97efe..13b7d68 100644 --- a/app/styles/global.scss +++ b/app/styles/global.scss @@ -3,4 +3,5 @@ html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + color: white; } diff --git a/app/ui/Button.vue b/app/ui/Button.vue index 18b8d94..4ce1f05 100644 --- a/app/ui/Button.vue +++ b/app/ui/Button.vue @@ -7,6 +7,7 @@ interface ButtonProps { variant?: "default" | "ghost" full?: boolean iconName?: string + centerText?: boolean } const props = withDefaults(defineProps(), { @@ -23,7 +24,11 @@ const props = withDefaults(defineProps(), { :to="props.to" :class="[ `button type-${props.variant}`, - { full: props.full, icon: $slots.icon || props.iconName }, + { + full: props.full, + icon: $slots.icon || props.iconName, + center: props.centerText, + }, ]" > @@ -48,6 +53,10 @@ const props = withDefaults(defineProps(), { .full { width: 100%; text-align: left; + + &.center { + justify-content: center; + } } .button, diff --git a/app/ui/Card.vue b/app/ui/Card.vue new file mode 100644 index 0000000..98bfa1b --- /dev/null +++ b/app/ui/Card.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/app/ui/Checkbox.vue b/app/ui/Checkbox.vue new file mode 100644 index 0000000..e4168b1 --- /dev/null +++ b/app/ui/Checkbox.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/app/ui/Input.vue b/app/ui/Input.vue index 0149de0..3032434 100644 --- a/app/ui/Input.vue +++ b/app/ui/Input.vue @@ -1,8 +1,15 @@