将 Solid and Light Font Awesome Pro 添加到 React 站点
Posted
技术标签:
【中文标题】将 Solid and Light Font Awesome Pro 添加到 React 站点【英文标题】:Add Solid and Light Font Awesome Pro to React site 【发布时间】:2021-11-04 23:34:45 【问题描述】:我有一个 React 网站,FontAwesome Pro 可以正常工作。如何添加第二个咖啡图标,但来自 pro-light-svg-icons
而不是 pro-duotone-svg-icons
?
import FontAwesomeIcon from "@fortawesome/react-fontawesome"
import faTwitter from "@fortawesome/free-brands-svg-icons"
import faCoffee from "@fortawesome/pro-duotone-svg-icons"
const IndexPage = () =>
return (
<Layout>
<p>Twitter icon goes her : <FontAwesomeIcon icon=faTwitter />
<FontAwesomeIcon icon=faCoffee />
</p>
</Layout>
)
【问题讨论】:
【参考方案1】:在此处的常见问题解答部分找到https://fontawesome.com/v5.15/how-to-use/on-the-web/using-with/react
import faCoffee as fasFaCoffee from '@fortawesome/pro-solid-svg-icons' import faCoffee as farFaCoffee from '@fortawesome/pro-regular-svg-icons'
【讨论】:
以上是关于将 Solid and Light Font Awesome Pro 添加到 React 站点的主要内容,如果未能解决你的问题,请参考以下文章
自动驾驶 11-1: 光检测和测距传感器LIDAR Light Detection and Ranging Sensors
LED Decorative Light Manufacturer - Decorative Lighting: Functionality And Aesthetics