/
githubmirror
/
gogs
Обзор
Документация
Войти
/
githubmirror
/
gogs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
web/src/components/ui/card.tsx
37 строк
1 KB
ᴊᴏᴇ ᴄʜᴇɴ
web: align components with React 19 and fix accessibility findings (#8306)
31 май 2026, 18:06
Не верифицирован
31 май 2026, 18:06
2c46f01
Код
Авторство
О чём код?
import * as React from "react"; import { cn } from "@/lib/utils"; function Card({ className, ...props }: React.ComponentProps<"div">) { return ( <div className={cn( "rounded-lg border border-(--color-border) bg-(--color-card) text-(--color-card-foreground) shadow-xs", className, )} {...props} /> ); } function CardHeader({ className, ...props }: React.ComponentProps<"div">) { return <div className={cn("flex flex-col gap-1.5 px-5 pt-5 sm:px-6 sm:pt-6", className)} {...props} />; } function CardTitle({ className, ...props }: React.ComponentProps<"h2">) { return <h2 className={cn("text-xl font-semibold text-(--color-foreground)", className)} {...props} />; } function CardDescription({ className, ...props }: React.ComponentProps<"p">) { return <p className={cn("text-sm text-(--color-muted-foreground)", className)} {...props} />; } function CardContent({ className, ...props }: React.ComponentProps<"div">) { return <div className={cn("px-5 py-5 sm:px-6 sm:py-6", className)} {...props} />; } function CardFooter({ className, ...props }: React.ComponentProps<"div">) { return <div className={cn("flex items-center px-5 pb-5 sm:px-6 sm:pb-6", className)} {...props} />; } export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };