Skip to content

Commit ec8d539

Browse files
committed
docs: Update readme
1 parent 634981c commit ec8d539

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,24 @@ export const App = () => {
149149
```
150150
![](https://github.com/fwh1990/react-native-iconfont-cli/blob/master/images/default-color-icon.png?raw=true)
151151
### 图标单色
152-
单色图标,如果不指定颜色值,图标将渲染原本的颜色。如果你想设置为其他的颜色,那么设置一个你想要的颜色即可
152+
单色图标,如果不指定颜色值,图标将渲染原本的颜色。如果你想设置为其他的颜色,那么设置一个你想要的颜色即可。
153+
154+
**注意:如果你在props传入的color是字符串而不是数组,那么即使原本是多色彩的图标,也会变成单色图标。**
155+
153156
```typescript jsx
154157
<Icon name="alipay" color="green" />
155158
```
156159
![](https://github.com/fwh1990/react-native-iconfont-cli/blob/master/images/one-color-icon.png?raw=true)
160+
157161
### 图标多色彩
158162
多色彩的图标,如果不指定颜色值,图标将渲染原本的多色彩。如果你想设置为其他的颜色,那么设置一组你想要的颜色即可
159163
```typescript jsx
160164
<Icon name="alipay" color={['green', 'orange']} />
161165
```
162166
颜色组的数量以及排序,需要根据当前图标的信息来确定。您需要进入图标组件中查看并得出结论。
163-
![](https://github.com/fwh1990/react-native-iconfont-cli/blob/master/images/multi-color-icon.png?raw=true)
164167

165-
**注意:如果color是字符串而不是数组,那么即使是多色彩图标,也会变成单色图标。**
168+
169+
![](https://github.com/fwh1990/react-native-iconfont-cli/blob/master/images/multi-color-icon.png?raw=true)
166170

167171
# 更新图标
168172
当您在iconfont.cn中的图标有变更时,只需更改配置`symbol_url`,然后再次执行`Step 4`即可生成最新的图标组件

0 commit comments

Comments
 (0)