2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-09 23:00:56 +00:00

Export types in Svelte component

This commit is contained in:
Vjacheslav Trushkin 2021-04-30 21:10:15 +03:00
parent 96314c0680
commit ce4385fb4f
3 changed files with 35 additions and 4 deletions

View File

@ -1,2 +1,17 @@
// Types
export type { IconifyJSON } from '@iconify/types';
export type { IconifyIcon } from '@iconify/core/lib/icon';
export type {
IconifyIconSize,
IconifyHorizontalIconAlignment,
IconifyVerticalIconAlignment,
} from '@iconify/core/lib/customisations';
// Types from props.ts
export type { IconifyIconCustomisations, IconProps } from './props';
// Component
export { default as Icon } from './Icon.svelte';
// Functions
export { addIcon, addCollection } from './functions';

View File

@ -1,2 +1,17 @@
// Types
export type { IconifyJSON } from '@iconify/types';
export type { IconifyIcon } from '@iconify/core/lib/icon';
export type {
IconifyIconSize,
IconifyHorizontalIconAlignment,
IconifyVerticalIconAlignment,
} from '@iconify/core/lib/customisations';
// Types from props.ts
export type { IconifyIconCustomisations, IconProps } from './props';
// Component
export { default as Icon } from './OfflineIcon.svelte';
// Functions
export { addIcon, addCollection } from './offline-functions';

View File

@ -22,15 +22,16 @@ export interface IconifyIconProps extends IconifyIconCustomisations {
// Shorthand properties
flip?: string;
align?: string;
// Unique id, used as base for ids for shapes. Use it to get consistent ids for server side rendering
id?: string;
}
/**
* Properties for element that are mentioned in generate-icon.ts
* 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?: string;
}