feat(drawer): padding customization

This commit is contained in:
07akioni 2021-03-05 12:40:26 +08:00
parent 098640daae
commit ef7a2ac9d9
5 changed files with 11 additions and 5 deletions

View File

@ -169,7 +169,7 @@ export default defineComponent({
cubicBezierEaseIn,
cubicBezierEaseOut
},
self: { color, textColor, boxShadow, lineHeight }
self: { color, textColor, boxShadow, lineHeight, padding }
} = themeRef.value
return {
'--line-height': lineHeight,
@ -178,7 +178,8 @@ export default defineComponent({
'--box-shadow': boxShadow,
'--bezier': cubicBezierEaseInOut,
'--bezier-out': cubicBezierEaseOut,
'--bezier-in': cubicBezierEaseIn
'--bezier-in': cubicBezierEaseIn,
'--padding': padding
}
}),
isMounted: isMountedRef

View File

@ -13,6 +13,7 @@ import fadeInTransition from '../../../_styles/transitions/fade-in'
// --bezier
// --bezier-out
// --bezier-in
// --padding
export default c([
cB('drawer', `
line-height: var(--line-height);
@ -33,12 +34,12 @@ export default c([
slideInFromBottomTransition(),
cM('native-scrollbar', {
boxSizing: 'border-box',
padding: '16px 24px'
padding: 'var(--padding)'
}),
cNotM('native-scrollbar', [
cB('drawer-scroll-content', {
boxSizing: 'border-box',
padding: '16px 24px'
padding: 'var(--padding)'
})
]),
cM('right-placement', `

View File

@ -11,6 +11,7 @@ const drawerDark: DrawerTheme = {
self (vars) {
const { modalColor, textColor2, boxShadow3, lineHeight } = vars
return {
padding: '16px 24px',
color: modalColor,
textColor: textColor2,
boxShadow: boxShadow3,

View File

@ -6,6 +6,7 @@ import { createTheme } from '../../_mixins'
const self = (vars: ThemeCommonVars) => {
const { modalColor, textColor2, boxShadow3, lineHeight } = vars
return {
padding: '16px 24px',
color: modalColor,
textColor: textColor2,
boxShadow: boxShadow3,

View File

@ -268,7 +268,9 @@ export const themeOverridesDark: GlobalThemeOverrides = {
Divider: {
color: '#5B5B5B'
},
Drawer: {},
Drawer: {
padding: '20px'
},
DynamicTags: {
peers: {
Tag: {