Add primary variant to button component

This commit is contained in:
marzban-dev
2025-03-27 14:15:11 +03:30
parent fcce711749
commit 4f75beb026
2 changed files with 27 additions and 1 deletions
+25
View File
@@ -44,6 +44,31 @@
}
}
@utility btn-primary {
@apply text-white bg-blue-500 border-[1.5px] border-transparent;
@apply btn-lg;
svg[class~="iconify"] path {
@apply stroke-white;
}
&:hover {
@apply bg-blue-200 border-blue-500 text-blue-500;
svg[class~="iconify"] path {
@apply stroke-blue-500;
}
}
&:disabled {
@apply bg-slate-100 text-slate-400;
svg[class~="iconify"] path {
@apply stroke-slate-400;
}
}
}
@utility btn-secondary {
@apply text-black bg-slate-100;
@apply btn-lg;
+2 -1
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
// types
type Props = {
variant?: "solid" | "secondary" | "outlined" | "ghost";
variant?: "solid" | "secondary" | "outlined" | "ghost" | "primary";
size?: "xl" | "lg" | "md";
startIcon?: string;
endIcon?: string;
@@ -24,6 +24,7 @@ const classes = computed(() => {
"btn-secondary": variant.value === "secondary",
"btn-outlined": variant.value === "outlined",
"btn-ghost": variant.value === "ghost",
"btn-primary": variant.value === "primary",
},
{
"btn-xl": size.value === "xl",