@emotion-icons/evaicons-solid
是一个基于 Emotion
编写的 Icon
库,其中包含了来自 Eva Design System 的一些常见图标。它可以快速而轻松地在您的项目中使用。
安装
首先,在您的项目中安装 @emotion/core
和 @emotion/styled
:
--- ------- ------------- ---------------
然后,您可以安装 @emotion-icons/evaicons-solid
:
--- ------- -----------------------------
使用
在您的 React
组件中,您可以使用 import
导入所需的图标,并渲染它们。如下所示:
------ ----- ---- -------- ------ - ---- - ---- -------------------------------- ------ - --- - ---- ---------------- ----- ----------- - -- -- - ----- ----- --------- ------ ----- ------- ----- ------ -------- -- -- ------ -- ------ ------- ------------
您还可以根据需要使用 className
来自定义图标,例如:
----- ------------------- --
小结
@emotion-icons/evaicons-solid
是一个方便且易于使用的 Icon
库,适用于 React
项目,为您提供来自 Eva Design System 的常见图标。它基于 Emotion
编写,可与 @emotion/core
和 @emotion/styled
配合使用。这个库使得在您的项目中使用图标变得非常容易。
来源:JavaScript中文网 ,转载请联系管理员! 本文地址:https://www.javascriptcn.com/post/5f24a39f3b0ab45f74a8b8f3