-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议可以配置默认颜色 #3
Comments
颜色不是都可以通过props传入吗? |
我不认为设置默认颜色是个好主意,因为这会把多色彩的图标也重置成单色了,在实际的业务场景中,工作量并不会降低。你觉得呢 |
是的 可以通过props传入 现在生成时候会有一个默认颜色生成 比如
这段代码里就有一个 #3333333 默认颜色了 , 或者应该设置一个开关 不填就不处理 填了就设置成默认颜色? 在项目实际用下来还是比用字体的方便点 但是最大问题是无法处理颜色 比如我要设置某个view下的icon都为#fff 这时候就要一个个设置 是否有解决方法吗? 感谢!! |
这个确实可以办得到,不过这样做会导致全部图标都是那个颜色,而不是某个view下面,也许不是你想要的。 |
明白了 或许我可以先尝试一下 感谢 @fwh1990 |
我这边做一个context上去,context是可行的补充方案 |
目前想了几种方案: <IconColorContext.Provider value="#fff"> 2、增加 <IconColorContext.Provider value={{ color: '#fff', size: 20 }}> 3、不处理,由用户自行实现,只需按照如上方案简单的包装即可 考虑中 |
比较支持第三点,用户自行封装就可以了 |
现在生成depends-on时候没法改默认颜色
The text was updated successfully, but these errors were encountered: