@flomon-ui/icons
Version:
Flomon icon components
69 lines (68 loc) • 1.83 kB
TypeScript
/// <reference types="react" />
import Icon from './Icon';
export type AnimationType = 'spin' | 'spin-pulse' | 'wrench' | 'ring' | 'vertical' | 'horizontal' | 'flash' | 'bounce' | 'float' | 'pulse' | 'tada' | 'passing' | 'passing-reverse' | 'burst' | 'falling' | 'shake';
export type AnimationTrigger = 'always' | 'duration' | 'hover' | 'parent-hover';
export interface IconProps extends React.HTMLAttributes<HTMLElement> {
/**
* Icon name
*
* @type {string}
*/
name: string;
/**
* Icon size
*
* @example 1, 2, 3, 4, 5, 6, 7, 8, 9, '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', 'lg'
* @default 1
* @type {(number | string)}
*/
size?: number | string;
/**
* Icon color
*
* @type {string}
*/
color?: string;
/**
* Make it visible or not
*
* @type {boolean}
*/
hidden?: boolean;
className?: string;
style?: React.CSSProperties;
/**
* Icon animation
*
* @type {AnimationType}
*/
animation?: AnimationType;
/**
* How to display icon animation
*
* @type {AnimationTrigger}
*/
animationTrigger?: AnimationTrigger;
animationDuration?: number;
/**
* Stacked icon name
*
* @type {string}
*/
innerName?: string;
innerSize?: number | string;
innerColor?: string;
innerHidden?: boolean;
innerClassName?: string;
innerStyle?: React.CSSProperties;
innerAnimation?: AnimationType;
innerAnimationTrigger?: AnimationTrigger;
innerAnimationDuration?: number;
/**
* Scale of nested and default icons (1x, 2x)
* @default [1, 1]
* @type {number[]}
*/
stackRatio?: number[];
}
export default Icon;