扣眼UI-自定义配色方案 [英] Grommet UI -- Custom Color Schemes

查看:90
本文介绍了扣眼UI-自定义配色方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将grommet-ui与webpack一起使用并做出反应. 如何设置自己的颜色选项.

I'm using grommet-ui with webpack and react. How do I set my own color options.

有没有办法使用我自己的自定义颜色/配色方案来代替诸如colorIndex ="neutral-1"之类的预定义颜色.

Is there a way to use my own custom colors/color schemes in place of predefined colors like colorIndex="neutral-1".

推荐答案

是的,有一种方法可以覆盖它们,但目前尚无记录.我将在这里开始检查颜色:

Yes, there is a way to override them, but it is currently not documented. I would start checking the colors here:

https://github.com. com/grommet/grommet/blob/master/src/scss/grommet-core/_settings.color.scss

例如,在此数组中使用了neutral-1

For example, neutral-1 is used from this array

$brand-neutral-colors: (#5d0cfb, #7026ff, #767676) !default;

在您的index.scss中,您可以替换它(!default允许替换):

In your index.scss you can replace that (!default allows replacement):

$brand-neutral-colors: (#333333, #7026ff, #767676)

我们正在为自定义主题变量添加文档.

We are working on adding documentation for custom theme variables.

这篇关于扣眼UI-自定义配色方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆