【问题标题】:Create Dynamic theme with antd and reactjs使用 antd 和 reactjs 创建动态主题
【发布时间】:2018-03-10 05:15:59
【问题描述】:

我正在使用reactjsantd 创建一个Web 应用程序。现在我想添加一个功能,用户将在其中选择颜色并更改所有原色或 Web 应用程序。我在谷歌上做了searched,但大多数人说它不可能使用antd。只是想知道是否有人以前尝试过还是可行的?

【问题讨论】:

    标签: reactjs themes antd


    【解决方案1】:

    Antd 支持setting a custom theme。您应该使用它来根据用户选择的颜色生成主题。

    例如theme.js:

    module.exports = () => {
      return {
        'primary-color': '#1DA57A',
        'link-color': '#1DA57A',
        'border-radius-base': '2px',
      };
    };
    

    【讨论】:

    猜你喜欢
    • 2019-11-18
    • 2021-02-16
    • 2019-01-24
    • 1970-01-01
    • 2011-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多