feat(layout-sider): add ToggleButtonTextColor (#1250)

* feat(layout-sider): add siderToggleButtonTextColor

* docs(changelog): fulfill

* feat(layout-sider): improve toggleButtonIconColor
This commit is contained in:
wenzheng 2021-09-29 00:09:48 +08:00 committed by GitHub
parent c58aaea137
commit d62f9348c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@
### Fixes
- Fix `n-layout-sider`'s `arrow-circle`'s icon style.
- Fix `n-upload`'s `show-preview-button` prop not workingcloses [#1238](https://github.com/TuSimple/naive-ui/issues/1238).
## 2.19.3 (2021-09-28)

View File

@ -4,6 +4,7 @@
### Fixes
- 修复 `n-layout-sider``arrow-circle` 的icon样式
- 修复 `n-upload``show-preview-button` 属性失效,关闭 [#1238](https://github.com/TuSimple/naive-ui/issues/1238)
## 2.19.3 (2021-09-28)

View File

@ -221,11 +221,13 @@ export default defineComponent({
vars['--color'] = self.siderColorInverted
vars['--text-color'] = self.textColorInverted
vars['--border-color'] = self.siderBorderColorInverted
vars['--toggle-button-icon-color'] = self.siderToggleButtonIconColorInverted
vars.__invertScrollbar = self.__invertScrollbar
} else {
vars['--color'] = self.siderColor
vars['--text-color'] = self.textColor
vars['--border-color'] = self.siderBorderColor
vars['--toggle-button-icon-color'] = self.siderToggleButtonIconColor
}
return vars
}),

View File

@ -106,7 +106,7 @@ export default cB('layout-sider', `
align-items: center;
justify-content: center;
font-size: 18px;
color: var(--text-color);
color: var(--toggle-button-icon-color);
border: var(--toggle-button-border);
background-color: var(--toggle-button-color);
box-shadow: 0 2px 4px 0px rgba(0, 0, 0, .06);

View File

@ -38,6 +38,8 @@ const layoutDark: LayoutTheme = {
siderColorInverted: cardColor,
siderToggleButtonBorder: '1px solid transparent',
siderToggleButtonColor: popoverColor,
siderToggleButtonIconColor: textColor2,
siderToggleButtonIconColorInverted: textColor2,
siderToggleBarColor: composite(bodyColor, scrollbarColor),
siderToggleBarColorHover: composite(bodyColor, scrollbarColorHover),
__invertScrollbar: 'false'

View File

@ -35,6 +35,8 @@ export const self = (vars: ThemeCommonVars) => {
siderColorInverted: invertedColor,
siderToggleButtonBorder: `1px solid ${dividerColor}`,
siderToggleButtonColor: baseColor,
siderToggleButtonIconColor: textColor2,
siderToggleButtonIconColorInverted: invertedColor,
siderToggleBarColor: composite(bodyColor, scrollbarColor),
siderToggleBarColorHover: composite(bodyColor, scrollbarColorHover),
// hack for inverted background