UNPKG

@geneui/components

Version:

The Gene UI components library designed for BI tools

71 lines (70 loc) 2.08 kB
import React, { HTMLAttributes, ReactNode } from 'react'; import './Button.scss'; export interface IButtonProps extends HTMLAttributes<HTMLButtonElement> { /** * Any valid React node <br> * Possible values: `ReactNode | string` */ children: ReactNode | string; /** * The way how the Button should be displayed <br/> * Possible values: `default | outline | minimal | grayscale | clean` */ appearance?: 'default' | 'outline' | 'minimal' | 'grayscale' | 'clean'; /** * Button size <br/> * Possible values: `default | medium | big` */ size?: 'default' | 'medium' | 'big'; /** * How to display inscription in relation to it's parent in Button <br/> * Possible values: `default | content-size | full-width` */ flexibility?: 'default' | 'content-size' | 'full-width'; /** * Button color <br/> * Possible values: `primary | confirm | danger | default` */ color?: 'primary' | 'confirm' | 'danger' | 'default'; /** * Button children direction either from the start, or from the end <br/> * Possible values: `start | end` */ itemsDirection?: 'start' | 'end'; /** * Button corner radius <br/> * Possible values: `round | smooth` */ cornerRadius?: 'round' | 'smooth'; /** * The property will add an "Icon" as Button child. The valid values can be found in "Icon" atom <br> * Possible values: `ReactNode | string` */ icon?: ReactNode | string; /** * Button disabled state */ disabled?: boolean; /** * Button active state */ active?: boolean; /** * Adding shadow to button */ withShadow?: boolean; /** * Button additional className */ className?: string; /** * Button text transforms to spinner */ loading?: boolean; /** * aria-label for button. */ ariaLabel?: string; } declare const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>; export default Button;