diff --git a/src/button/Button.tsx b/src/button/Button.tsx index 3c2bc82..2f7ba3a 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -31,6 +31,19 @@ import { ReactComponent as AddUserIcon } from "../icons/AddUser.svg"; import { ReactComponent as ArrowDownIcon } from "../icons/ArrowDown.svg"; import { TooltipTrigger } from "../Tooltip"; +export type ButtonVariant = + | "default" + | "toolbar" + | "toolbarSecondary" + | "icon" + | "secondary" + | "copy" + | "secondaryCopy" + | "iconCopy" + | "secondaryHangup" + | "dropdown" + | "link"; + export const variantToClassName = { default: [styles.button], toolbar: [styles.toolbarButton], @@ -45,12 +58,14 @@ export const variantToClassName = { link: [styles.linkButton], }; -export const sizeToClassName = { +export type ButtonSize = "lg"; + +export const sizeToClassName: { lg: string[] } = { lg: [styles.lg], }; interface Props { - variant: string; - size: number; + variant: ButtonVariant; + size: ButtonSize; on: () => void; off: () => void; iconStyle: string; @@ -113,7 +128,13 @@ export const Button = forwardRef( } ); -export function MicButton({ muted, ...rest }) { +export function MicButton({ + muted, + ...rest +}: { + muted: boolean; + [index: string]: unknown; +}) { return (