xtreme-ui
Version:
Collection of reusable components that can be used in web projects
36 lines • 1.06 kB
TypeScript
import { CSSProperties, HTMLAttributes } from 'react';
import { EIconType } from '../Icon/types';
export declare enum EButtonSize {
mini = "mini",
default = "default",
large = "large"
}
export interface BaseButton extends HTMLAttributes<HTMLButtonElement> {
className?: string;
style?: CSSProperties;
type?: keyof typeof EButtonTypes;
size?: keyof typeof EButtonSize;
loading?: boolean;
disabled?: boolean;
iconType?: keyof typeof EIconType;
iconPosition?: 'left' | 'right';
onClick?: () => void;
}
export interface ButtonWithLabel extends BaseButton {
label: string;
icon?: string;
}
export interface ButtonWithIconName extends BaseButton {
label?: string;
icon: string;
}
export type TButtonProps = ButtonWithLabel | ButtonWithIconName;
export declare enum EButtonTypes {
primary = "primary",
primaryDanger = "primaryDanger",
secondary = "secondary",
secondaryDanger = "secondaryDanger",
link = "link",
linkDanger = "linkDanger"
}
//# sourceMappingURL=types.d.ts.map