我正在使用grommet-ui和webpack进行反应.如何设置自己的颜色选项.
有没有办法使用我自己的自定义颜色/配色方案代替预定义的颜色,如colorIndex ="neutral-1".
是的,有一种方法可以覆盖它们,但目前尚未记录.我会在这里开始检查颜色:
https://github.com/grommet/grommet/blob/master/src/scss/grommet-core/_settings.color.scss
例如,neutral-1从此数组中使用
$brand-neutral-colors: (#5d0cfb, #7026ff, #767676) !default;
在你的index.scss,你可以替换(默认允许更换!):
$brand-neutral-colors: (#333333, #7026ff, #767676)
我们正在为自定义主题变量添加文档.