Skip to content

✨ [Feature]: 能否在 Color 板块让开发者动态切换各个样式颜色,并将可见效果同步到其他板块(如“Primary 按钮样式”) #323

@KunIsMe

Description

@KunIsMe

What problem does this feature solve

可以使开发者在颜色板块中,点击各个样式颜色变量调出色板,动态切换颜色并同步更新到全局,使在其他版块下都可以看到当前效果。
例如:
image
更改 primary 主要底色颜色变量后,譬如可以在 Button 按钮组件中看到“主要按钮“颜色发生改变。
image

What does the proposed API look like

动态更改全局定义的颜色变量(如:使用 css 变量示例)
document.documentElement.style.setProperty('--primary-color', '#000');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions