forked from cerc-io/snowballtools-base
* ⚡️ feat: create tabs component * ♻️ refactor: avoid big conflict on the example page * 🔧 chore: upgrade tailwindcss and install `@radix-ui/react-tabs` * ⚡️ feat: create globe icon component * 🎨 style: adjust vertical tab theme * 📝 docs: add vertical tabs to the example page
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import { Button, ButtonTheme } from 'components/shared/Button';
|
|
import { PlusIcon } from 'components/shared/CustomIcon';
|
|
import React from 'react';
|
|
|
|
export const renderButtons = () => {
|
|
return ['primary', 'secondary', 'tertiary', 'danger'].map(
|
|
(variant, index) => (
|
|
<div className="flex gap-5 flex-wrap" key={index}>
|
|
{['lg', 'md', 'sm', 'xs', 'disabled'].map((size) => (
|
|
<Button
|
|
leftIcon={<PlusIcon />}
|
|
rightIcon={<PlusIcon />}
|
|
variant={variant as ButtonTheme['variant']}
|
|
size={size !== 'disabled' ? (size as ButtonTheme['size']) : 'md'}
|
|
key={`${variant}-${size}`}
|
|
disabled={size === 'disabled'}
|
|
>
|
|
Button
|
|
</Button>
|
|
))}
|
|
</div>
|
|
),
|
|
);
|
|
};
|
|
|
|
export const renderButtonIcons = () => {
|
|
return [
|
|
'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 ButtonTheme['variant']}
|
|
size={size !== 'disabled' ? (size as ButtonTheme['size']) : 'md'}
|
|
key={`${variant}-${size}`}
|
|
disabled={size === 'disabled'}
|
|
>
|
|
<PlusIcon />
|
|
</Button>
|
|
))}
|
|
</div>
|
|
));
|
|
};
|