-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from SySagar/docs
docs(button): basic button variants and sizes
- Loading branch information
Showing
11 changed files
with
216 additions
and
16 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
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,14 @@ | ||
'use client'; | ||
import React from 'react'; | ||
|
||
export default function ComponenentWrapper({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<div className='flex flex-row items-center justify-center h-[300px] gap-20'> | ||
{children} | ||
</div> | ||
); | ||
} |
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,4 @@ | ||
'use client'; | ||
import '../global.css'; | ||
|
||
export * from '@groovy-box/ui'; |
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 |
---|---|---|
@@ -1,6 +1,166 @@ | ||
--- | ||
title: Button | ||
description: A basic BUtton | ||
description: Displays a basic button or a component that looks like a button. | ||
--- | ||
|
||
button stuff | ||
## Default | ||
|
||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; | ||
import { Button } from '@/app/ui'; | ||
import ComponenentWrapper from '@/app/ui/ComponenentWrapper'; | ||
|
||
<Tabs items={['Preview', 'Code']}> | ||
<Tab value='Preview'> | ||
<ComponenentWrapper> | ||
<Button variant="default">default</Button> | ||
</ComponenentWrapper> | ||
|
||
</Tab> | ||
<Tab value='Code'> | ||
|
||
```tsx | ||
import { Button } from "@groovy-box/ui" | ||
|
||
export function ButtonDefault() { | ||
return <Button variant='default'>default</Button>; | ||
} | ||
|
||
```` | ||
|
||
</Tab> | ||
</Tabs> | ||
|
||
## Secondary | ||
<Tabs items={['Preview', 'Code']}> | ||
<Tab value='Preview'> | ||
<ComponenentWrapper> | ||
<Button variant="secondary">secondary</Button> | ||
</ComponenentWrapper> | ||
|
||
</Tab> | ||
<Tab value='Code'> | ||
|
||
```tsx | ||
import { Button } from "@groovy-box/ui" | ||
|
||
export function ButtonSecondary() { | ||
return <Button variant='secondary'>secondary</Button>; | ||
} | ||
|
||
```` | ||
|
||
</Tab> | ||
|
||
</Tabs> | ||
|
||
## Destructive | ||
|
||
<Tabs items={['Preview', 'Code']}> | ||
<Tab value='Preview'> | ||
<ComponenentWrapper> | ||
<Button variant="destructive">destructive</Button> | ||
</ComponenentWrapper> | ||
|
||
</Tab> | ||
<Tab value='Code'> | ||
|
||
```tsx | ||
import { Button } from '@groovy-box/ui'; | ||
|
||
export function ButtonDestructive() { | ||
return <Button variant='destructive'>destructive</Button>; | ||
} | ||
``` | ||
|
||
</Tab> | ||
|
||
</Tabs> | ||
|
||
## Outline | ||
|
||
<Tabs items={['Preview', 'Code']}> | ||
<Tab value='Preview'> | ||
<ComponenentWrapper> | ||
<Button variant="outline">outline</Button> | ||
</ComponenentWrapper> | ||
|
||
</Tab> | ||
<Tab value='Code'> | ||
|
||
```tsx | ||
import { Button } from '@groovy-box/ui'; | ||
|
||
export function ButtonOutline() { | ||
return <Button variant='outline'>outline</Button>; | ||
} | ||
``` | ||
|
||
</Tab> | ||
|
||
</Tabs> | ||
|
||
## Link | ||
|
||
<Tabs items={['Preview', 'Code']}> | ||
<Tab value='Preview'> | ||
<ComponenentWrapper> | ||
<Button variant="link">Link</Button> | ||
</ComponenentWrapper> | ||
|
||
</Tab> | ||
<Tab value='Code'> | ||
|
||
```tsx | ||
import { Button } from '@groovy-box/ui'; | ||
|
||
export function ButtonLink() { | ||
return <Button variant='link'>Link</Button>; | ||
} | ||
``` | ||
|
||
</Tab> | ||
|
||
</Tabs> | ||
|
||
## Sizes | ||
|
||
<Tabs items={['Preview', 'Code']}> | ||
<Tab value='Preview'> | ||
<ComponenentWrapper> | ||
<div> | ||
<Button size="sm">Small</Button> | ||
</div> | ||
<div> | ||
<Button size="default">Medium</Button> | ||
</div> | ||
<div> | ||
<Button size="lg">Large</Button> | ||
</div> | ||
</ComponenentWrapper> | ||
|
||
</Tab> | ||
<Tab value='Code'> | ||
|
||
```tsx | ||
import { Button } from '@groovy-box/ui'; | ||
|
||
export function ButtonLink() { | ||
return ( | ||
<div> | ||
<div> | ||
<Button size='sm'>Small</Button> | ||
</div> | ||
<div> | ||
<Button size='default'>Medium</Button> | ||
</div> | ||
<div> | ||
<Button size='lg'>Large</Button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
</Tab> | ||
|
||
</Tabs> |
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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