2
0
mirror of https://github.com/iconify/iconify.git synced 2024-10-24 01:22:04 +00:00
iconify/packages/svelte/src/props.ts

44 lines
957 B
TypeScript
Raw Normal View History

2021-04-29 18:06:25 +00:00
import type { IconifyIcon } from '@iconify/types';
import type { IconifyIconCustomisations as RawIconCustomisations } from '@iconify/core/lib/customisations';
export { RawIconCustomisations };
2021-04-29 18:06:25 +00:00
// Allow rotation to be string
/**
* Icon customisations
*/
export type IconifyIconCustomisations = RawIconCustomisations & {
2021-04-29 18:06:25 +00:00
rotate?: string | number;
};
/**
* Icon properties
*/
export interface IconifyIconProps extends IconifyIconCustomisations {
// Icon object
icon: IconifyIcon | string;
2021-04-29 18:06:25 +00:00
// Style
color?: string;
// Shorthand properties
flip?: string;
align?: string;
}
/**
2021-04-30 18:10:15 +00:00
* Properties for element that are mentioned in render.ts
2021-04-29 18:06:25 +00:00
*/
interface IconifyElementProps {
2021-04-30 18:10:15 +00:00
// Unique id, used as base for ids for shapes. Use it to get consistent ids for server side rendering
id?: string;
// Style
2021-04-29 18:06:25 +00:00
style?: string;
}
/**
* Mix of icon properties and HTMLElement properties
*/
export type IconProps = IconifyElementProps & IconifyIconProps;