Skip to content

Commit a6e13a2

Browse files
committed
refactor: update CardContent to CardBody for clarity and consistency
1 parent e406c11 commit a6e13a2

34 files changed

+146
-86
lines changed

apps/docs/app/examples/cards/_components/cookie-settings.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Button,
33
Card,
4-
CardContent,
4+
CardBody,
55
CardDescription,
66
CardFooter,
77
CardHeader,
@@ -18,7 +18,7 @@ export function CookieSettings(): JSX.Element {
1818
<CardTitle>Cookie Settings</CardTitle>
1919
<CardDescription>Manage your cookie settings here.</CardDescription>
2020
</CardHeader>
21-
<CardContent className="grid gap-6">
21+
<CardBody className="grid gap-6">
2222
<div className="flex items-center justify-between gap-x-2">
2323
<Label className="flex flex-col space-y-1" htmlFor="necessary">
2424
<span>Strictly Necessary</span>
@@ -48,7 +48,7 @@ export function CookieSettings(): JSX.Element {
4848
</Label>
4949
<Switch id="performance" />
5050
</div>
51-
</CardContent>
51+
</CardBody>
5252
<CardFooter>
5353
<Button className="w-full" variant="outline">
5454
Save preferences

apps/docs/app/examples/cards/_components/create-account.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Button,
33
Card,
4-
CardContent,
4+
CardBody,
55
CardDescription,
66
CardFooter,
77
CardHeader,
@@ -22,7 +22,7 @@ export function CreateAccount(): JSX.Element {
2222
Enter your email below to create your account
2323
</CardDescription>
2424
</CardHeader>
25-
<CardContent className="grid gap-4">
25+
<CardBody className="grid gap-4">
2626
<div className="grid grid-cols-2 gap-6">
2727
<Button prefix={<Icons.GitHub />} variant="outline">
2828
Github
@@ -53,7 +53,7 @@ export function CreateAccount(): JSX.Element {
5353
placeholder="********"
5454
/>
5555
</div>
56-
</CardContent>
56+
</CardBody>
5757
<CardFooter>
5858
<Button className="w-full">Create account</Button>
5959
</CardFooter>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { Card, CardContent, Label } from '@codefast/ui';
1+
import { Card, CardBody, Label } from '@codefast/ui';
22
import { type JSX } from 'react';
33
import { DatePickerWithRange } from '@/components/date-picker-with-range';
44

55
export function DatePicker(): JSX.Element {
66
return (
77
<Card>
8-
<CardContent className="pt-6">
8+
<CardBody className="pt-6">
99
<div className="space-y-2">
1010
<Label className="shrink-0" htmlFor="date">
1111
Pick a date
1212
</Label>
1313
<DatePickerWithRange className="[&>button]:w-64" />
1414
</div>
15-
</CardContent>
15+
</CardBody>
1616
</Card>
1717
);
1818
}

apps/docs/app/examples/cards/_components/github-card.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Button,
33
Card,
4-
CardContent,
4+
CardBody,
55
CardDescription,
66
CardHeader,
77
CardTitle,
@@ -75,7 +75,7 @@ export function Github(): JSX.Element {
7575
</DropdownMenu>
7676
</div>
7777
</CardHeader>
78-
<CardContent>
78+
<CardBody>
7979
<div className="text-muted-foreground flex space-x-4 text-sm">
8080
<div className="flex items-center">
8181
<CircleIcon className="mr-1 size-3 fill-sky-400 text-sky-400" />
@@ -87,7 +87,7 @@ export function Github(): JSX.Element {
8787
</div>
8888
<div>Updated April 2023</div>
8989
</div>
90-
</CardContent>
90+
</CardBody>
9191
</Card>
9292
);
9393
}

apps/docs/app/examples/cards/_components/notifications.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
Card,
3-
CardContent,
3+
CardBody,
44
CardDescription,
55
CardHeader,
66
CardTitle,
@@ -17,7 +17,7 @@ export function Notifications(): JSX.Element {
1717
Choose what you want to be notified about.
1818
</CardDescription>
1919
</CardHeader>
20-
<CardContent className="grid gap-1">
20+
<CardBody className="grid gap-1">
2121
<div className="hover:bg-accent hover:text-accent-foreground -mx-2 flex items-start space-x-4 rounded-md p-2 transition-all">
2222
<BellIcon className="mt-px size-5" />
2323
<div className="space-y-1">
@@ -45,7 +45,7 @@ export function Notifications(): JSX.Element {
4545
</p>
4646
</div>
4747
</div>
48-
</CardContent>
48+
</CardBody>
4949
</Card>
5050
);
5151
}

apps/docs/app/examples/cards/_components/payment-method.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Button,
33
Card,
4-
CardContent,
4+
CardBody,
55
CardDescription,
66
CardFooter,
77
CardHeader,
@@ -28,7 +28,7 @@ export function PaymentMethod(): JSX.Element {
2828
Add a new payment method to your account.
2929
</CardDescription>
3030
</CardHeader>
31-
<CardContent className="grid gap-6">
31+
<CardBody className="grid gap-6">
3232
<RadioGroup className="grid grid-cols-3 gap-4" defaultValue="card">
3333
<div>
3434
<RadioGroupItem className="peer sr-only" id="card" value="card" />
@@ -131,7 +131,7 @@ export function PaymentMethod(): JSX.Element {
131131
<TextInput id="cvc" placeholder="CVC" />
132132
</div>
133133
</div>
134-
</CardContent>
134+
</CardBody>
135135
<CardFooter>
136136
<Button className="w-full">Continue</Button>
137137
</CardFooter>

apps/docs/app/examples/cards/_components/report-an-issue.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Button,
33
Card,
4-
CardContent,
4+
CardBody,
55
CardDescription,
66
CardFooter,
77
CardHeader,
@@ -26,7 +26,7 @@ export function ReportAnIssue(): JSX.Element {
2626
What area are you having problems with?
2727
</CardDescription>
2828
</CardHeader>
29-
<CardContent className="grid gap-6">
29+
<CardBody className="grid gap-6">
3030
<div className="grid grid-cols-2 gap-4">
3131
<div className="grid gap-2">
3232
<Label htmlFor="area">Area</Label>
@@ -69,7 +69,7 @@ export function ReportAnIssue(): JSX.Element {
6969
placeholder="Please include all information relevant to your issue."
7070
/>
7171
</div>
72-
</CardContent>
72+
</CardBody>
7373
<CardFooter className="justify-between space-x-2">
7474
<Button variant="ghost">Cancel</Button>
7575
<Button>Submit</Button>

apps/docs/app/examples/cards/_components/share-document.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
AvatarImage,
55
Button,
66
Card,
7-
CardContent,
7+
CardBody,
88
CardDescription,
99
CardHeader,
1010
CardTitle,
@@ -27,7 +27,7 @@ export function ShareDocument(): JSX.Element {
2727
Anyone with the link can view this document.
2828
</CardDescription>
2929
</CardHeader>
30-
<CardContent>
30+
<CardBody>
3131
<div className="flex space-x-2">
3232
<TextInput readOnly value="https://example.com/link/to/document" />
3333
<Button className="shrink-0" variant="secondary">
@@ -109,7 +109,7 @@ export function ShareDocument(): JSX.Element {
109109
</div>
110110
</div>
111111
</div>
112-
</CardContent>
112+
</CardBody>
113113
</Card>
114114
);
115115
}

apps/docs/app/examples/cards/_components/team-members.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
AvatarImage,
55
Button,
66
Card,
7-
CardContent,
7+
CardBody,
88
CardDescription,
99
CardHeader,
1010
CardTitle,
@@ -30,7 +30,7 @@ export function TeamMembers(): JSX.Element {
3030
Invite your team members to collaborate.
3131
</CardDescription>
3232
</CardHeader>
33-
<CardContent className="grid gap-6">
33+
<CardBody className="grid gap-6">
3434
<div className="flex items-center justify-between gap-x-4">
3535
<div className="flex items-center space-x-4">
3636
<Avatar>
@@ -145,7 +145,7 @@ export function TeamMembers(): JSX.Element {
145145
</PopoverContent>
146146
</Popover>
147147
</div>
148-
</CardContent>
148+
</CardBody>
149149
</Card>
150150
);
151151
}

apps/docs/app/examples/charts/_components/chart-area-axes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import {
44
Card,
5-
CardContent,
5+
CardBody,
66
CardDescription,
77
CardFooter,
88
CardHeader,
@@ -47,7 +47,7 @@ export function ChartAreaAxes(): JSX.Element {
4747
Showing total visitors for the last 6 months
4848
</CardDescription>
4949
</CardHeader>
50-
<CardContent>
50+
<CardBody>
5151
<ChartContainer config={chartConfig}>
5252
<AreaChart
5353
accessibilityLayer
@@ -90,7 +90,7 @@ export function ChartAreaAxes(): JSX.Element {
9090
/>
9191
</AreaChart>
9292
</ChartContainer>
93-
</CardContent>
93+
</CardBody>
9494
<CardFooter>
9595
<div className="flex w-full items-start gap-2 text-sm">
9696
<div className="grid gap-2">

0 commit comments

Comments
 (0)