import clsx from 'clsx'; import React from 'react'; import type IconComponent from '~icons/material-symbols'; import { ThemeColor, getThemeColorHexByName, getThemeColorRgbByName } from '../../../../shared/util/themeColors'; import Text from '../Text/Text'; interface Props { className?: string; style?: React.CSSProperties; variant: 'filled' | 'outline' | 'single'; onClick?: () => void; icon?: typeof IconComponent; disabled?: boolean; title?: string; color: ThemeColor; } /** * A reusable button component that follows the design system of the extension. * @returns */ export function Button({ className, style, variant, onClick, icon, disabled, title, color, children, }: React.PropsWithChildren): JSX.Element { const Icon = icon; const isIconOnly = !children && !!icon; const colorHex = getThemeColorHexByName(color); const colorRgb = getThemeColorRgbByName(color)?.join(' '); return ( ); }