angular-line-awesome
Version:
Angular Line Awesome is an Angular component to manage Line Awesome icons.
65 lines (64 loc) • 1.89 kB
TypeScript
export type IconPrefix = 'las' | 'lab' | 'lar';
export type FlipProp = 'horizontal' | 'vertical' | 'both';
export type PullProp = 'left' | 'right';
export type RotateProp = 90 | 180 | 270;
export type SizeProp = 'xs' | 'lg' | 'sm' | 'lx' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x';
export type IconProp = IconName | [IconPrefix, IconName] | IconLookup;
export type IconName = string;
export interface Styles {
[key: string]: string;
}
export interface IconLookup {
prefix: IconPrefix;
iconName: IconName;
}
export interface Icon {
prefix: IconPrefix;
iconName: IconName;
}
export interface LaProps {
mask?: IconProp;
className?: string;
size?: SizeProp;
fixedWidth?: boolean;
rotate?: RotateProp;
flip?: FlipProp;
pull?: PullProp;
spin?: boolean;
pulse?: boolean;
border?: boolean;
counter?: boolean;
inverse?: boolean;
transform?: string | Transform;
style?: Styles;
stackItemSize?: '1x' | '2x';
}
export interface Transform {
size?: number;
x?: number;
y?: number;
rotate?: number;
flipX?: boolean;
flipY?: boolean;
}
export interface IconParams {
title?: string;
classes?: string[];
attributes?: Attributes;
styles?: Styles;
transform?: Transform;
}
export interface Attributes {
[key: string]: number | string;
}
export interface LineAwesomeIcon {
name: string;
data: string;
}
export declare const IconNamePrefix = "la";
export declare const IconDefaultPrefix = "las";
export declare const isIconLookup: (i: IconProp) => i is Icon;
export declare const faNormalizeIcon: (icon: IconProp) => Icon;
export declare const laClassList: (props: LaProps) => string[];
export declare const applyCssTransforms: (transformObj: Transform) => string;
export declare const parseTransformString: (transformString: string) => Transform;