UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

69 lines (68 loc) 1.93 kB
import React from 'react'; import { StandardProps, Overwrite } from '../../util/component-types'; export interface IButtonPropsRaw extends StandardProps { /** * Disables the Button by greying it out * * @default false **/ isDisabled: boolean; /** * Activates the Button by giving it a "pressed down" look * * @default false **/ isActive: boolean; /** * Set this to `true` if you want the Button to only contain an icon. * * @default false * */ hasOnlyIcon: boolean; /** Style variations of the Button */ kind?: 'primary' | 'link' | 'danger' | 'invisible'; /** Size variations of the Button */ size?: 'short' | 'small' | 'large'; /** Called when the user clicks the \`Button\`. */ onClick: ({ event, props, }: { event: React.MouseEvent<HTMLButtonElement>; props: IButtonProps; }) => void; /** * Form element type variations of Button. Passed through to DOM Button. * * @default "button" * */ type: 'submit' | 'reset' | 'button'; callbackId?: any; } export declare type IButtonProps = Overwrite<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, IButtonPropsRaw>; /** Test Button description */ export declare const Button: { (props: IButtonProps): React.ReactElement; defaultProps: { isDisabled: boolean; isActive: boolean; onClick: (...args: any[]) => void; type: "button"; hasOnlyIcon: boolean; }; displayName: string; peek: { description: string; categories: string[]; }; propName: string; propTypes: { isDisabled: any; isActive: any; className: any; hasOnlyIcon: any; children: any; kind: any; size: any; onClick: any; type: any; }; }; export default Button;