import React from 'react'; import { BoxButtonProps, SilkeBox } from '../silke-box'; import styles from './silke-tabs.scss'; import { SilkeIcon, SilkeIcons } from '../silke-icon'; type IconColor = 'default' | 'neutral' | 'accent' | 'error' | 'success' | 'warning'; export type SilkeTabProps = { label: React.ReactNode; active?: boolean; icon?: SilkeIcons; iconColor?: IconColor; disabled?: boolean; } & Omit; export function SilkeTab({ label, active, className, icon, iconColor = 'default', ...rest }: SilkeTabProps) { let cl = styles.tab; if (active) cl += ' ' + styles.active; if (className) cl += ' ' + className; return ( {icon && ( )} {label} ); }