full-iconify-icon
title: FullIconifyIcon Type
types:
IconifyIcon: '/docs/types/iconify-icon.md'
functions:
defaultIconProps: './default-icon-props.md'
FullIconifyIcon type
[type]FullIconifyIcon type is used in Iconify Utils to handle icon data.
You can find this type in [file]src/icon/index.ts of Iconify Utils source code.
This type is identical to [type]IconifyIcon, except that all properties are mandatory.
import type { IconifyIcon } from '@iconify/types';
export type FullIconifyIcon = Required<IconifyIcon>;
See [type]IconifyIcon type for details.
Example
{
"body": "<path d=\"M7 6v12l10-6z\" fill=\"currentColor\"/>",
"left": 0,
"top": 0,
"width": 24,
"height": 24,
"rotate": 0,
"vFlip": false,
"hFlip": false
}
Usage
To convert [type]IconifyIcon to [type]FullIconifyIcon, merge [func]defaultIconProps with your data:
src: libraries/utils/full-iconify-icon.ts
title: 'usage.ts'
extra:
- src: libraries/utils/full-iconify-icon.json
title: 'Result:'
这篇文档对你有帮助吗?
谢谢你的反馈!