ui: refactor some shadcn styles into utiltiy classes

This commit is contained in:
2026-02-09 21:04:59 -08:00
parent 72ee0260d9
commit a9008627a1
2 changed files with 9 additions and 4 deletions

View File

@@ -12,9 +12,6 @@
<LabelPrimitive.Root
bind:ref
data-slot="label"
class={cn(
"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
)}
class={cn("scn-label", className)}
{...restProps}
/>

View File

@@ -134,4 +134,12 @@
.btn-icon-sm {
@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;
}
}