-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: anvuvuong <[email protected]>
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../card'; | ||
import { Label } from '../label'; | ||
import { Input } from '../input'; | ||
import { Button } from '../button'; | ||
|
||
function CardDemo() { | ||
return ( | ||
<Card className='w-[360px]'> | ||
<CardHeader className='text-center'> | ||
<CardTitle className='text-3xl font-bold'>Login</CardTitle> | ||
<CardDescription>Enter credentials to access your account.</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<form> | ||
<div className='mb-2 flex flex-col gap-2'> | ||
<Label>Username or email</Label> | ||
<Input className='rounded shadow-sm focus-visible:ring-0 focus-visible:ring-offset-0' /> | ||
</div> | ||
<div className='mb-2 flex flex-col gap-2'> | ||
<Label>Password</Label> | ||
<Input className='rounded shadow-sm focus-visible:ring-0 focus-visible:ring-offset-0' /> | ||
</div> | ||
<a | ||
href='/' | ||
className='text-muted-foreground text-sm' | ||
> | ||
Forgot password? | ||
</a> | ||
</form> | ||
</CardContent> | ||
<CardFooter className='flex-col gap-2'> | ||
<Button className='w-full'>Submit</Button> | ||
<Button | ||
className='w-full' | ||
variant='secondary' | ||
> | ||
Sign Up | ||
</Button> | ||
</CardFooter> | ||
</Card> | ||
); | ||
} | ||
|
||
const meta = { | ||
title: 'Coderum/Card', | ||
component: CardDemo, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
} satisfies Meta<typeof CardDemo>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const CardExample: Story = {}; |