📝 docs: add button link component to the example page
This commit is contained in:
parent
d385e5e7c5
commit
ee1854f56b
@ -7,7 +7,11 @@ import {
|
|||||||
} from './renders/checkbox';
|
} from './renders/checkbox';
|
||||||
import { avatars, avatarsFallback } from './renders/avatar';
|
import { avatars, avatarsFallback } from './renders/avatar';
|
||||||
import { renderBadges } from './renders/badge';
|
import { renderBadges } from './renders/badge';
|
||||||
import { renderButtonIcons, renderButtons } from './renders/button';
|
import {
|
||||||
|
renderButtonIcons,
|
||||||
|
renderButtons,
|
||||||
|
renderLinks,
|
||||||
|
} from './renders/button';
|
||||||
import {
|
import {
|
||||||
renderTabWithBadges,
|
renderTabWithBadges,
|
||||||
renderTabs,
|
renderTabs,
|
||||||
@ -112,6 +116,16 @@ const Page = () => {
|
|||||||
<h1 className="text-2xl font-bold">Vertical Tabs</h1>
|
<h1 className="text-2xl font-bold">Vertical Tabs</h1>
|
||||||
{renderVerticalTabs()}
|
{renderVerticalTabs()}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="w-full h border border-gray-200 px-20 my-10" />
|
||||||
|
|
||||||
|
{/* Link */}
|
||||||
|
<div className="flex flex-col gap-10 items-center justify-between">
|
||||||
|
<h1 className="text-2xl font-bold">Link</h1>
|
||||||
|
<div className="flex gap-4 items-center justify-center">
|
||||||
|
{renderLinks()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,3 +47,19 @@ export const renderButtonIcons = () => {
|
|||||||
</div>
|
</div>
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const renderLinks = () => {
|
||||||
|
return ['link', 'link-emphasized', 'disabled'].map((variant) => (
|
||||||
|
<Button
|
||||||
|
variant={
|
||||||
|
variant !== 'disabled' ? (variant as ButtonTheme['variant']) : 'link'
|
||||||
|
}
|
||||||
|
key={variant}
|
||||||
|
leftIcon={<PlusIcon />}
|
||||||
|
rightIcon={<PlusIcon />}
|
||||||
|
disabled={variant === 'disabled'}
|
||||||
|
>
|
||||||
|
Link
|
||||||
|
</Button>
|
||||||
|
));
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user