📝 docs: add button link component to the example page

This commit is contained in:
Wahyu Kurniawan 2024-02-21 17:12:32 +07:00
parent d385e5e7c5
commit ee1854f56b
No known key found for this signature in database
GPG Key ID: 040A1549143A8E33
2 changed files with 31 additions and 1 deletions

View File

@ -7,7 +7,11 @@ import {
} from './renders/checkbox';
import { avatars, avatarsFallback } from './renders/avatar';
import { renderBadges } from './renders/badge';
import { renderButtonIcons, renderButtons } from './renders/button';
import {
renderButtonIcons,
renderButtons,
renderLinks,
} from './renders/button';
import {
renderTabWithBadges,
renderTabs,
@ -112,6 +116,16 @@ const Page = () => {
<h1 className="text-2xl font-bold">Vertical Tabs</h1>
{renderVerticalTabs()}
</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>

View File

@ -47,3 +47,19 @@ export const renderButtonIcons = () => {
</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>
));
};