import * as React from 'react'; import ILocalContainerProps from '../../../../common/structures/ILocalContainerProps'; import { FunctionGeneric } from '../../../../common/structures/Generics'; export declare enum ButtonPropColor { default = "default", gray = "gray", green = "green", orange = "orange", red = "red" } export declare enum ButtonPropPadding { s = "s", m = "m", l = "l", none = "none" } export declare enum ButtonSvgStyle { fill = "fill", stroke = "stroke", background = "background", none = "none" } export declare enum ButtonPropFontSize { xs = "xs", s = "s", m = "m", l = "l", xl = "xl", xxl = "xxl" } export declare enum ButtonPropFontWeight { heavy = "heavy", medium = "medium", light = "light" } export declare enum ButtonPropForm { fill = "fill", outline = "outline", reversed = "reversed", text = "text" } declare enum ButtonPropTextTransform { none = "none", upper = "upper" } declare enum ButtonPropTextDecoration { none = "none", underline = "underline", underlineOnHover = "underlineOnHover" } /** Props common to all button forms */ export interface IButtonCommonProps extends ILocalContainerProps { /** Whether the button is disabled. */ disabled?: boolean; /** Whether the button is active. */ active?: boolean; /** The form name attribute */ name?: string; /** The click handler. */ onClick?: FunctionGeneric; /** The html element tag used for the button. */ tag?: string; /** Props specific to the tag prop tag defined and applied to this component. */ tagProps?: { [prop: string]: any; }; /** The default behavior of the button. */ type?: 'button' | 'submit' | 'reset'; /** SVG Icon to be placed left of text */ leftIcon?: any; /** SVG Icon to be placed right of text */ rightIcon?: any; /** Whether the svg is stroke only, fill only, or whether to not modify either */ svgStyle?: ButtonSvgStyle | keyof typeof ButtonSvgStyle; /** Display inline-flex vs flex */ inline?: boolean; /** Stop propagation - prevents button keydown event from bubbling up to wrapping elements with potential listeners */ stopKeyDownPropagation?: boolean; } /** * Props specific to a button form, surfaced via privateOptions. * A button form should be built by specifying these props, and instances * of that form should sitll be able to modify them via privateOptions. */ export interface IButtonBaseProps extends IButtonCommonProps { /** The main color applied to the button. */ color?: ButtonPropColor | keyof typeof ButtonPropColor; /** The styles applied to the button that forms how colors are applied to styles like background, border, color, etc. */ form?: ButtonPropForm | keyof typeof ButtonPropForm; /** The fontSize of padding applied to the button. */ padding?: ButtonPropPadding | keyof typeof ButtonPropPadding; /** The font-fontSize applied to the button. */ fontSize?: ButtonPropFontSize | keyof typeof ButtonPropFontSize; /** The font-weight applied to the button */ fontWeight?: ButtonPropFontWeight | keyof typeof ButtonPropFontWeight; /** The casing applied to the button */ textTransform?: ButtonPropTextTransform | keyof typeof ButtonPropTextTransform; /** The text decoration applied to the button */ textDecoration?: ButtonPropTextDecoration | keyof typeof ButtonPropTextDecoration; } /** * Base button component, other buttons built on this * Note child text will reflect true case by default */ declare const ButtonBase: { (props: IButtonBaseProps): React.JSX.Element; defaultProps: { color: ButtonPropColor; disabled: boolean; fontSize: ButtonPropFontSize; form: ButtonPropForm; padding: ButtonPropPadding; tag: string; fontWeight: ButtonPropFontWeight; textTransform: ButtonPropTextTransform; textDecoration: ButtonPropTextDecoration; svgStyle: ButtonSvgStyle; }; }; export { ButtonBase }; //# sourceMappingURL=ButtonBase.d.ts.map