import { ComponentProps, ElementType, ReactElement, ReactNode } from "react"; import { Link } from "react-router-dom"; import { LayoutProps, SpaceProps } from "styled-system"; import { BoxProps } from "../Box"; export declare enum ButtonScales { ICON = "icon", LG = "lg", MD = "md", SM = "sm", XS = "xs" } export declare enum ButtonVariants { RED = "red", BROWN = "brown", LIGHTBROWN = "lightbrown", DEEPBROWN = "deepbrown", LINE = "line", TRANSPARENT = "transparent", PRIMARY = "primary", SECONDARY = "secondary", TERTIARY = "tertiary", TEXT = "text", DANGER = "danger", SUBTLE = "subtle", SUCCESS = "success" } /** * @see https://www.benmvp.com/blog/polymorphic-react-components-typescript/ */ export declare type AsProps = { as?: E; }; export declare type MergeProps = AsProps & Omit, keyof AsProps>; export declare type PolymorphicComponentProps = P & MergeProps; export declare type PolymorphicComponent = (props: PolymorphicComponentProps) => ReactElement | null; export interface BaseButtonProps extends LayoutProps, SpaceProps { as?: "a" | "button" | typeof Link; external?: boolean; isLoading?: boolean; scale?: ButtonScales | string; variant?: ButtonVariants | string; disabled?: boolean; startIcon?: ReactNode; endIcon?: ReactNode; textStyle?: string; isAutoMinWidth?: boolean; md?: boolean; sm?: boolean; xs?: boolean; lg?: boolean; icon?: boolean; } export declare type ButtonProps

= PolymorphicComponentProps; export declare type IconButtonProps

= PolymorphicComponentProps; export interface ButtonGroupProps extends BoxProps { r?: string; } export interface DoubleArrowButtonsProps { type?: string; disableLeftArrow: boolean; disableRightArrow: boolean; onClickLeftArrow: () => any; onClickRightArrow: () => any; }