Skip to content

Commit 61857ea

Browse files
ntatoudclaude
andcommitted
fix: revert card to pre-update styles and fix login-hint whitespace
Reverts card.tsx to its previous styling (rounded-sm, border, py-4, gap-2, font-semibold titles) as the new shadcn defaults don't fit the current design. Also fixes a whitespace collapse bug in login-hint flex containers where trailing {' '} was being stripped — replaced with gap-x-1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent adf17e3 commit 61857ea

2 files changed

Lines changed: 10 additions & 21 deletions

File tree

src/components/ui/card.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ import * as React from 'react';
22

33
import { cn } from '@/lib/tailwind/utils';
44

5-
function Card({
6-
className,
7-
size = 'default',
8-
...props
9-
}: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {
5+
function Card({ className, ...props }: React.ComponentProps<'div'>) {
106
return (
117
<div
128
data-slot="card"
13-
data-size={size}
149
className={cn(
15-
'group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',
10+
'flex flex-col gap-2 rounded-sm border bg-card py-4 text-card-foreground',
1611
className
1712
)}
1813
{...props}
@@ -25,7 +20,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
2520
<div
2621
data-slot="card-header"
2722
className={cn(
28-
'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4',
23+
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4',
2924
className
3025
)}
3126
{...props}
@@ -37,10 +32,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
3732
return (
3833
<div
3934
data-slot="card-title"
40-
className={cn(
41-
'text-base leading-normal font-medium group-data-[size=sm]/card:text-sm',
42-
className
43-
)}
35+
className={cn('leading-none font-semibold', className)}
4436
{...props}
4537
/>
4638
);
@@ -73,7 +65,7 @@ function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
7365
return (
7466
<div
7567
data-slot="card-content"
76-
className={cn('px-6 group-data-[size=sm]/card:px-4', className)}
68+
className={cn('px-4', className)}
7769
{...props}
7870
/>
7971
);
@@ -83,10 +75,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
8375
return (
8476
<div
8577
data-slot="card-footer"
86-
className={cn(
87-
'flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4',
88-
className
89-
)}
78+
className={cn('flex items-center px-4 [.border-t]:pt-4', className)}
9079
{...props}
9180
/>
9281
);

src/features/devtools/login-hint.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export const LoginEmailHint = () => {
3636
{envClient.VITE_IS_DEMO ? 'Demo mode' : 'Dev mode'}
3737
</AlertTitle>
3838
<AlertDescription className="flex flex-wrap gap-x-1 text-sm leading-4">
39-
You can login with{' '}
39+
You can login with
4040
<LoginEmailButton email="admin@admin.com" form={form} />
41-
{' or '}
41+
or
4242
<LoginEmailButton email="user@user.com" form={form} />
4343
</AlertDescription>
4444
</Alert>
@@ -58,8 +58,8 @@ export const LoginEmailOtpHint = () => {
5858
<AlertTitle>
5959
{envClient.VITE_IS_DEMO ? 'Demo mode' : 'Dev mode'}
6060
</AlertTitle>
61-
<AlertDescription className="flex text-sm leading-4">
62-
Use the code{' '}
61+
<AlertDescription className="flex gap-x-1 text-sm leading-4">
62+
Use the code
6363
<button
6464
type="button"
6565
className="cursor-pointer font-medium text-neutral-900 underline underline-offset-4 hover:no-underline dark:text-white"

0 commit comments

Comments
 (0)