mirror of
https://github.com/iconify/iconify.git
synced 2025-02-02 03:58:25 +00:00
svg framework: rename IconRenderMode type
This commit is contained in:
parent
40dd0aba48
commit
efa79b10ae
@ -15,7 +15,7 @@ export const inlineClass = 'iconify-inline';
|
|||||||
* 'mask' = inline style using `mask`
|
* 'mask' = inline style using `mask`
|
||||||
* 'inline' = inline SVG.
|
* 'inline' = inline SVG.
|
||||||
*/
|
*/
|
||||||
export type IconRenderMode = 'style' | 'bg' | 'mask' | 'inline';
|
export type IconifyRenderMode = 'style' | 'bg' | 'mask' | 'inline';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data used to verify if icon is the same
|
* Data used to verify if icon is the same
|
||||||
@ -31,7 +31,7 @@ export interface IconifyElementProps {
|
|||||||
customisations: Required<IconifyIconCustomisations>;
|
customisations: Required<IconifyIconCustomisations>;
|
||||||
|
|
||||||
// Render mode
|
// Render mode
|
||||||
mode?: IconRenderMode;
|
mode?: IconifyRenderMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
alignmentFromString,
|
alignmentFromString,
|
||||||
flipFromString,
|
flipFromString,
|
||||||
} from '@iconify/utils/lib/customisations/shorthand';
|
} from '@iconify/utils/lib/customisations/shorthand';
|
||||||
import { IconRenderMode, inlineClass } from './config';
|
import { IconifyRenderMode, inlineClass } from './config';
|
||||||
import type { IconifyElementProps } from './config';
|
import type { IconifyElementProps } from './config';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ export function getElementProps(element: Element): IconifyElementProps | null {
|
|||||||
|
|
||||||
// Get render mode. Not checking actual value because incorrect values are treated as inline
|
// Get render mode. Not checking actual value because incorrect values are treated as inline
|
||||||
const mode = element.getAttribute('data-mode') as
|
const mode = element.getAttribute('data-mode') as
|
||||||
| IconRenderMode
|
| IconifyRenderMode
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user