diff --git a/src/components/card-item/card-item.jsx b/src/components/card-item/card-item.jsx new file mode 100644 index 0000000..8573585 --- /dev/null +++ b/src/components/card-item/card-item.jsx @@ -0,0 +1,36 @@ +// @ts-nocheck +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, + CardImagem, + CardButton + } from "@/components/ui/card" + + export const CardItem = () => { + return ( + + + + + Cat Name + Breed + + +

Age

+
+ +

Description

+
+ + Edit + +
+ + ); + } + + \ No newline at end of file diff --git a/src/components/card-item/card-item.stories.tsx b/src/components/card-item/card-item.stories.tsx new file mode 100644 index 0000000..a891271 --- /dev/null +++ b/src/components/card-item/card-item.stories.tsx @@ -0,0 +1,19 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { CardItem } from './card-item'; + +const meta: Meta = { + component: CardItem, +}; + +export default meta; +type Story = StoryObj; + +/* + *👇 Render functions are a framework specific feature to allow you control on how the component renders. + * See https://storybook.js.org/docs/api/csf + * to learn how to use render functions. + */ +export const Primary: Story = { + render: () => , +}; \ No newline at end of file diff --git a/src/components/card-item/img/cat.png b/src/components/card-item/img/cat.png new file mode 100644 index 0000000..b0ae1cc Binary files /dev/null and b/src/components/card-item/img/cat.png differ diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx index afa13ec..ea0626a 100644 --- a/src/components/ui/card.tsx +++ b/src/components/ui/card.tsx @@ -1,15 +1,39 @@ import * as React from "react" + import { cn } from "@/lib/utils" +import Cat from "@/components/card-item/img/cat.png" + + +const CardImagem = () => { + return ( +
+ +
+ + ); +} + +interface ButtonProps { + children: React.ReactNode; +} + +const CardButton: React.FC = ({ children }) => { + return ( + <> + + + ) +} const Card = React.forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -
(({ className, ...props }, ref) => (
)) @@ -36,7 +60,7 @@ const CardTitle = React.forwardRef<

>(({ className, ...props }, ref) => ( -

(({ className, ...props }, ref) => (

)) CardFooter.displayName = "CardFooter" -export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } +export { CardButton, CardImagem, Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } diff --git a/src/main.tsx b/src/main.tsx index 098196f..7f98191 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -18,6 +18,7 @@ import { HomePage } from "./pages/home"; import "./index.css"; + const router = createBrowserRouter([ { path: "/",