projex-ui-dev
Version:
Projex' user interface
45 lines (44 loc) • 1.21 kB
TypeScript
import React, { ReactNode } from 'react';
interface Props extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'style'> {
style?: 'primary' | 'secondary' | 'warning' | 'alert' | 'text' | 'text_gray' | 'textAlert';
block?: boolean;
disabled?: boolean;
htmlType?: 'submit' | 'reset' | 'button';
icon?: ReactNode;
iconPosition?: 'left' | 'right';
loading?: boolean;
small?: boolean;
children: ReactNode;
onClick?: React.MouseEventHandler<HTMLButtonElement>;
}
/**
* ## Maïa Button
*
* Different button styles can be generated by setting Button properties.
*
* The recommended order is:
* <b><u>color</u></b> ->
* <b><u>small</u></b> ->
* <b><u>loading</u></b> ->
* <b><u>disabled</u></b>.
*
* ### Usage example
*
* ```jsx
* <Button
* color="white"
* small
* loading
* disabled
* block
* htmlType="reset"
* icon={<Storybook />}
* iconPosition="right"
* onClick={() => console.log('Made with 💙 by Maïa Team!)}
* >
* {Children}
* </Button>
* ```
*/
declare const Button: ({ style, small, loading, disabled, block, htmlType, icon, iconPosition, children, onClick, ...props }: Props) => React.JSX.Element;
export default Button;