feat(settings): change delete account button to secondary variant

chore(button): update button font to use label font

chore(label): update label font to use label font

chore(login-form): update input placeholder text

chore(labeled-input): update input font to use label font

feat(global-styles): add custom font families for heading and label

chore(popover): update popover background color to match background
This commit is contained in:
Maximilian Liebmann 2025-05-22 15:21:36 +02:00
parent 509b8f59f5
commit d8cbffa611
7 changed files with 33 additions and 12 deletions

View file

@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/utils';
const buttonVariants = cva(
"radius-lg inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
"radius-lg inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-label transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
{
variants: {
variant: {
@ -37,7 +37,7 @@ const buttonVariants = cva(
);
function Button({
className,
className = 'font-label',
variant,
size,
asChild = false,

View file

@ -15,7 +15,7 @@ export default function LabeledInput({
name?: string;
}) {
return (
<div className='grid grid-cols-1 gap-1'>
<div className='grid grid-cols-1 gap-1 font-label'>
<Label htmlFor={name}>{label}</Label>
<Input

View file

@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
type={type}
data-slot='input'
className={cn(
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-label disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
className,

View file

@ -13,7 +13,7 @@ function Label({
<LabelPrimitive.Root
data-slot='label'
className={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',
'flex items-center gap-2 text-sm leading-none font-label 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,
)}
{...props}

View file

@ -25,13 +25,13 @@ export default function LoginForm() {
<LabeledInput
type='email'
label='E-Mail or Username'
placeholder='What you are known as.'
placeholder='What you are known as'
name='email'
/>
<LabeledInput
type='password'
label='Password'
placeholder="Let's hope you remember it."
placeholder="Let's hope you remember it"
name='password'
/>
<div className='grid grid-rows-2 gap-2'>