【发布时间】:2021-07-23 03:57:01
【问题描述】:
我正在尝试在我的 react-styleguidist 文档中使用 Google Material Icons。 在我的 styleguide.config.js 文件中,我尝试过
module.exports = {
template: './template.html'
}
然后将<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"> 添加到template.html 文件的<head> 标记中,但react-styleguidist 似乎不再识别这种格式了。
我尝试使用如下模板和主题:
template: {
head: {
links: [
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Material+Icons'
}
]
}
},
theme: {
fontFamily: {
base: "Material+Icons"
}
}
这只是用文字而不是实际的图标显示图标名称。我认为这种方法仅适用于 Roboto 等实际字体。任何帮助将不胜感激。
【问题讨论】:
标签: html reactjs google-material-icons react-styleguidist