@up-group/react-controls
Version:
We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get
63 lines (62 loc) • 2 kB
TypeScript
/// <reference types="react" />
import UpButton from './UpButton';
import { ThemedProps, IntentType } from '../../../Common/theming/types';
import { Tooltip } from '../../Display/Tooltip';
import { IconName } from '../../../Components/Display/SvgIcon/icons';
export declare const fontSizeMap: {
xsmall: number;
small: number;
medium: number;
large: number;
xlarge: number;
};
export declare const buttonSizeMap: {
normal: string;
icon: string;
auto: string;
};
export declare type FontSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
export declare type ButtonWidth = 'normal' | 'icon' | 'auto';
export declare type ButtonHeight = 'xsmall' | 'small' | 'normal' | 'large';
export declare type ActionType = IconName;
export declare type IconPosition = 'none' | 'left' | 'right';
export declare type DropDownType = 'none' | 'up' | 'down' | 'element';
export interface Action {
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
iconName?: any;
tooltip?: string | Tooltip;
libelle: string;
}
export interface Separator {
size?: number;
}
export interface CommonProps extends ThemedProps {
color?: string;
backgroundColor?: string;
borderColor?: string;
fontSize?: FontSize;
disabled?: boolean;
shadow?: boolean;
rounded?: boolean;
rotate?: boolean;
actionType?: ActionType;
iconName?: any;
iconSize?: number;
iconPosition?: IconPosition;
intent?: IntentType;
width?: ButtonWidth;
height?: ButtonHeight;
tooltip?: string | Tooltip;
extraActions?: Array<Action | Separator>;
dropDown?: DropDownType;
isProcessing?: boolean;
}
export interface UpButtonProps extends CommonProps {
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
}
export interface UpButtonStyledProps extends UpButtonProps {
className?: string;
dataFor?: string;
isToggled?: boolean;
}
export default UpButton;