@teamsnap/teamsnap-ui
Version:
a CSS component library for TeamSnap
66 lines (65 loc) • 2.16 kB
TypeScript
/**
* @name Button
*
* @description
* A common button component that will render the appropriate styles for a button or link. See the teamsnap patterns
* library for more information https://teamsnap-ui-patterns.netlify.com/patterns/components/button.html
*
* @example
* <Button
* handleClick={ () => console.warn('Clicky Clicky') }
* color='primary'
* size='small'
* isDisabled
* mods='u-spaceTopMd'>
* Click Me
* </Button>
*
*/
import * as React from "react";
import * as PropTypes from "prop-types";
declare class Button extends React.PureComponent<PropTypes.InferProps<typeof Button.propTypes>, any> {
static propTypes: {
type: PropTypes.Requireable<string>;
label: PropTypes.Requireable<string>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
icon: PropTypes.Requireable<string>;
iconPosition: PropTypes.Requireable<string>;
routerLink: PropTypes.Requireable<(...args: any[]) => any>;
location: PropTypes.Requireable<string>;
onClick: PropTypes.Requireable<(...args: any[]) => any>;
isDisabled: PropTypes.Requireable<boolean>;
isActive: PropTypes.Requireable<boolean>;
color: PropTypes.Requireable<string>;
size: PropTypes.Requireable<string>;
className: PropTypes.Requireable<string>;
mods: PropTypes.Requireable<string>;
style: PropTypes.Requireable<object>;
otherProps: PropTypes.Requireable<object>;
};
static defaultProps: {
type: string;
label: any;
children: any;
icon: any;
iconPosition: string;
routerLink: any;
location: string;
onClick: any;
isDisabled: boolean;
isActive: boolean;
color: any;
size: any;
className: string;
mods: any;
style: {};
otherProps: {};
};
getButtonClassName: () => any;
renderIcon: (icon: any, mods: any) => JSX.Element;
renderChildren: () => JSX.Element;
renderButtonLink: () => JSX.Element;
renderButton: () => JSX.Element;
render(): JSX.Element;
}
export default Button;