import React from "react"; import { StyledButton, StyledButtonProps, ItemWrapper, ButtonChildrenWrapper } from "./style"; import { Label2 } from "../../typography"; export enum ButtonType { primary = "primary", secondary = "secondary", tertiary = "tertiary", quaternary = "quaternary", round = "round" } export enum ButtonSize { small = "small", regular = "regular" } interface IProps extends Omit, "ref" | "type" | "as">, Omit { label: string; icon?: React.ReactNode; secondaryIcon?: React.ReactNode; labelProps?: Omit, "ref" | "as">; } export const Button = ({ buttonType, icon, secondaryIcon, label, labelProps, buttonSize, ...props }: IProps) => { return ( {icon && {icon}} {buttonType !== ButtonType.round && ( {label} )} {secondaryIcon && {secondaryIcon}} ); };