forked from cerc-io/snowballtools-base
📝 docs: add button icon only on component example
This commit is contained in:
parent
7e6b74208d
commit
943d427db1
@ -1,4 +1,5 @@
|
|||||||
import { Button } from 'components/shared/Button';
|
import { Button, ButtonOrLinkProps } from 'components/shared/Button';
|
||||||
|
import { PlusIcon } from 'components/shared/CustomIcon';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
@ -17,13 +18,55 @@ const Page = () => {
|
|||||||
{/* Insert Components here */}
|
{/* Insert Components here */}
|
||||||
<div className="flex flex-col gap-10 items-center justify-between">
|
<div className="flex flex-col gap-10 items-center justify-between">
|
||||||
<h1 className="text-2xl font-bold">Button</h1>
|
<h1 className="text-2xl font-bold">Button</h1>
|
||||||
<div className="flex gap-10 flex-wrap">
|
<div className="flex flex-col gap-10">
|
||||||
<Button size="lg" disabled>
|
{['primary', 'secondary', 'tertiary', 'danger'].map(
|
||||||
Button
|
(variant, index) => (
|
||||||
</Button>
|
<div className="flex gap-5 flex-wrap" key={index}>
|
||||||
<Button size="md">Button</Button>
|
{['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
|
||||||
<Button size="sm">Button</Button>
|
<Button
|
||||||
<Button size="xs">Button</Button>
|
leftIcon={<PlusIcon />}
|
||||||
|
rightIcon={<PlusIcon />}
|
||||||
|
variant={variant as ButtonOrLinkProps['variant']}
|
||||||
|
size={
|
||||||
|
size !== 'disabled'
|
||||||
|
? (size as ButtonOrLinkProps['size'])
|
||||||
|
: 'md'
|
||||||
|
}
|
||||||
|
key={`${variant}-${size}`}
|
||||||
|
disabled={size === 'disabled'}
|
||||||
|
>
|
||||||
|
Button
|
||||||
|
</Button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
{[
|
||||||
|
'primary',
|
||||||
|
'secondary',
|
||||||
|
'tertiary',
|
||||||
|
'ghost',
|
||||||
|
'danger',
|
||||||
|
'danger-ghost',
|
||||||
|
].map((variant, index) => (
|
||||||
|
<div className="flex gap-5 flex-wrap" key={index}>
|
||||||
|
{['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
|
||||||
|
<Button
|
||||||
|
iconOnly
|
||||||
|
variant={variant as ButtonOrLinkProps['variant']}
|
||||||
|
size={
|
||||||
|
size !== 'disabled'
|
||||||
|
? (size as ButtonOrLinkProps['size'])
|
||||||
|
: 'md'
|
||||||
|
}
|
||||||
|
key={`${variant}-${size}`}
|
||||||
|
disabled={size === 'disabled'}
|
||||||
|
>
|
||||||
|
<PlusIcon />
|
||||||
|
</Button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user