Add new UI components: Card and Checkbox; enhance Input and Button with additional props
This commit is contained in:
1 parent
89f84e571f
commit
e1716c3e61
6 files changed
+205
-15
No files matched your search
+10
-1
@@ -7,6 +7,7 @@ interface ButtonProps {
|
||||
variant?: "default" | "ghost"
|
||||
full?: boolean
|
||||
iconName?: string
|
||||
centerText?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<ButtonProps>(), {
|
||||
@@ -23,7 +24,11 @@ const props = withDefaults(defineProps<ButtonProps>(), {
|
||||
: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,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<span class="icon-wrapper">
|
||||
@@ -48,6 +53,10 @@ const props = withDefaults(defineProps<ButtonProps>(), {
|
||||
.full {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
|
||||
&.center {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.button,
|
||||
|
||||
Reference in new issue
Block a user