mirror of
https://github.com/iconify/iconify.git
synced 2024-10-24 01:22:04 +00:00
42 lines
907 B
TypeScript
42 lines
907 B
TypeScript
|
import { IconifyIcon } from '@iconify/types';
|
||
|
import { IconifyIconCustomisations as IconCustomisations } from '@iconify/core/lib/customisations';
|
||
|
|
||
|
// Allow rotation to be string
|
||
|
/**
|
||
|
* Icon customisations
|
||
|
*/
|
||
|
export type IconifyIconCustomisations = IconCustomisations & {
|
||
|
rotate?: string | number;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* Icon properties
|
||
|
*/
|
||
|
export interface IconifyIconProps extends IconifyIconCustomisations {
|
||
|
// Icon object
|
||
|
icon: IconifyIcon | string;
|
||
|
|
||
|
// Style
|
||
|
color?: string;
|
||
|
|
||
|
// Shorthand properties
|
||
|
flip?: string;
|
||
|
align?: string;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Properties for element that are mentioned in render.ts
|
||
|
*/
|
||
|
interface IconifyElementProps {
|
||
|
// Unique id, used as base for ids for shapes. Use it to get consistent ids for server side rendering
|
||
|
id?: string;
|
||
|
|
||
|
// Style
|
||
|
style?: unknown;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Mix of icon properties and HTMLElement properties
|
||
|
*/
|
||
|
export type IconProps = IconifyElementProps & IconifyIconProps;
|