diff --git a/apps/www/.vitepress/theme/style.css b/apps/www/.vitepress/theme/style.css index d0989dd4..0cdcacad 100644 --- a/apps/www/.vitepress/theme/style.css +++ b/apps/www/.vitepress/theme/style.css @@ -113,6 +113,10 @@ pre code { @apply relative rounded font-mono text-sm ; } + + pre code .line { + @apply px-4 min-h-[1.5rem] !py-0.5 w-full inline-block; + } } @@ -125,12 +129,7 @@ @apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background; @apply ml-[-50px] mt-[-4px]; content: counter(step); - } - - pre code .line { - @apply px-4 min-h-[1.5rem] !py-0.5 w-full inline-block; - } - + } } @media (max-width: 640px) { diff --git a/apps/www/src/lib/registry/default/ui/toggle/Toggle.vue b/apps/www/src/lib/registry/default/ui/toggle/Toggle.vue index fb4bdd64..64aa4dbb 100644 --- a/apps/www/src/lib/registry/default/ui/toggle/Toggle.vue +++ b/apps/www/src/lib/registry/default/ui/toggle/Toggle.vue @@ -1,46 +1,35 @@ diff --git a/apps/www/src/lib/registry/default/ui/toggle/index.ts b/apps/www/src/lib/registry/default/ui/toggle/index.ts index 6bfe49c1..ad34b648 100644 --- a/apps/www/src/lib/registry/default/ui/toggle/index.ts +++ b/apps/www/src/lib/registry/default/ui/toggle/index.ts @@ -1 +1,25 @@ +import { cva } from 'class-variance-authority' + export { default as Toggle } from './Toggle.vue' + +export const toggleVariants = cva( + 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground', + { + variants: { + variant: { + default: 'bg-transparent', + outline: + 'border border-input bg-transparent hover:bg-accent hover:text-accent-foreground', + }, + size: { + default: 'h-10 px-3', + sm: 'h-9 px-2.5', + lg: 'h-11 px-5', + }, + }, + defaultVariants: { + variant: 'default', + size: 'default', + }, + }, +)