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

@ -6,6 +6,9 @@
:root { :root {
/* Custom values */ /* Custom values */
--font-heading: 'Comfortaa', sans-serif;
--font-label: 'Varela Round', sans-serif;
--transparent: transparent; --transparent: transparent;
--neutral-000: oklch(0 0 0); --neutral-000: oklch(0 0 0);
@ -30,9 +33,9 @@
--radius: 0.688rem; --radius: 0.688rem;
--primary: oklch(0.7493 0.1551 74.95); --primary: oklch(0.7493 0.1551 74.95);
--hover-primary: oklch(0.6568 0.1358 74.86 / 0.8); --hover-primary: oklch(0.7493 0.1551 74.95 / 0.8);
--active-primary: oklch(0.5911 0.1135 78.29); --active-primary: oklch(0.6191 0.1218 77.58);
--disabled-primary: oklch(0.6568 0.1358 74.86 / 0.5); --disabled-primary: oklch(0.7493 0.1551 74.95 / 0.5);
--secondary: oklch(0.4937 0.1697 271.26); --secondary: oklch(0.4937 0.1697 271.26);
--hover-secondary: oklch(0.4937 0.1697 271.26 / 0.8); --hover-secondary: oklch(0.4937 0.1697 271.26 / 0.8);
@ -100,7 +103,25 @@
--sidebar-ring: oklch(0.707 0.022 261.325); --sidebar-ring: oklch(0.707 0.022 261.325);
} }
@font-face {
font-family: 'Comfortaa';
font-style: normal;
font-weight: 300 700;
src: url('/Fonts/Comfortaa/Comfortaa-VariableFont_weight.ttf')
format('truetype');
}
@font-face {
font-family: 'Varela Round';
font-style: normal;
font-weight: 400;
src: url('/Fonts/VarelaRound/VarelaRound-Regular.ttf') format('truetype');
}
@theme inline { @theme inline {
--font-heading: var(--font-heading);
--font-label: var(--font-label);
--transparent: var(--transparent); --transparent: var(--transparent);
--color-neutral-000: var(--neutral-000); --color-neutral-000: var(--neutral-000);
@ -152,7 +173,7 @@
--color-card-foreground: var(--card-foreground); --color-card-foreground: var(--card-foreground);
--color-popover: var(--popover); --color-popover: var(--color-background);
--color-popover-foreground: var(--popover-foreground); --color-popover-foreground: var(--popover-foreground);

View file

@ -88,7 +88,7 @@ export default function SettingsPage() {
</Select> </Select>
</div> </div>
<div className='pt-4'> <div className='pt-4'>
<Button variant='destructive'>Delete Account</Button> <Button variant='secondary'>Delete Account</Button>
<p className='text-sm text-muted-foreground pt-1'> <p className='text-sm text-muted-foreground pt-1'>
Permanently delete your account and all associated data. Permanently delete your account and all associated data.
</p> </p>

View file

@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
const buttonVariants = cva( 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: { variants: {
variant: { variant: {
@ -37,7 +37,7 @@ const buttonVariants = cva(
); );
function Button({ function Button({
className, className = 'font-label',
variant, variant,
size, size,
asChild = false, asChild = false,

View file

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

View file

@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
type={type} type={type}
data-slot='input' data-slot='input'
className={cn( 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]', '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', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
className, className,

View file

@ -13,7 +13,7 @@ function Label({
<LabelPrimitive.Root <LabelPrimitive.Root
data-slot='label' data-slot='label'
className={cn( 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, className,
)} )}
{...props} {...props}

View file

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