fix: the style problem of danger button when switching theme mode; 🐛

修复:切换主题模式时危险按钮的样式问题;
master
iczer 4 years ago
parent f9aa9e2c53
commit 1ebed9eaec
  1. 6
      src/utils/colors.js
  2. 8
      src/utils/themeUtil.js

@ -23,9 +23,9 @@ function getFunctionalColors(mode) {
const warningColors = generate(warning, options) const warningColors = generate(warning, options)
const errorColors = generate(error, options) const errorColors = generate(error, options)
return { return {
success: [...successColors.slice(0, 3), successColors[5]], success: successColors,
warning: [...warningColors.slice(0, 3), warningColors[5]], warning: warningColors,
error: [...errorColors.slice(0, 3), errorColors[5]] error: errorColors
} }
} }

@ -43,9 +43,9 @@ module.exports = {
'primary-9': palettes[8], 'primary-9': palettes[8],
'primary-10': palettes[9], 'primary-10': palettes[9],
'info-color': primary, 'info-color': primary,
'success-color': success[3], 'success-color': success[5],
'warning-color': warning[3], 'warning-color': warning[5],
'error-color': error[3], 'error-color': error[5],
'alert-info-bg-color': palettes[0], 'alert-info-bg-color': palettes[0],
'alert-info-border-color': palettes[2], 'alert-info-border-color': palettes[2],
'alert-success-bg-color': success[0], 'alert-success-bg-color': success[0],
@ -58,6 +58,8 @@ module.exports = {
'menu-dark-submenu-bg': menuColors[0], 'menu-dark-submenu-bg': menuColors[0],
'layout-header-background': menuColors[1], 'layout-header-background': menuColors[1],
'layout-trigger-background': menuColors[2], 'layout-trigger-background': menuColors[2],
'btn-danger-bg': error[4],
'btn-danger-border': error[4],
...ANTD.theme[theme.mode] ...ANTD.theme[theme.mode]
} }
} }

Loading…
Cancel
Save