ui: refactor some shadcn styles into utiltiy classes
This commit is contained in:
@@ -12,9 +12,6 @@
|
|||||||
<LabelPrimitive.Root
|
<LabelPrimitive.Root
|
||||||
bind:ref
|
bind:ref
|
||||||
data-slot="label"
|
data-slot="label"
|
||||||
class={cn(
|
class={cn("scn-label", className)}
|
||||||
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...restProps}
|
{...restProps}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -134,4 +134,12 @@
|
|||||||
.btn-icon-sm {
|
.btn-icon-sm {
|
||||||
@apply inline-flex h-8 w-8 items-center justify-center rounded border;
|
@apply inline-flex h-8 w-8 items-center justify-center rounded border;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@layer scn {
|
||||||
|
/* Stolen styles from svelte-shadcn to make the final css look less tailwindy */
|
||||||
|
.scn-label {
|
||||||
|
@apply flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user