Browse Source
fix: v5 component style (#37413)
* fix: v5 component style
* chore: fix csp
pull/37432/head
MadCcc
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
9 additions and
12 deletions
-
components/config-provider/index.tsx
-
components/mentions/style/index.tsx
-
components/popconfirm/style/index.tsx
|
|
@ -142,7 +142,7 @@ export const globalConfig = () => ({ |
|
|
|
const ProviderChildren: React.FC<ProviderChildrenProps> = props => { |
|
|
|
const { |
|
|
|
children, |
|
|
|
csp, |
|
|
|
csp: customCsp, |
|
|
|
autoInsertSpaceInButton, |
|
|
|
form, |
|
|
|
locale, |
|
|
@ -153,7 +153,7 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = props => { |
|
|
|
dropdownMatchSelectWidth, |
|
|
|
legacyLocale, |
|
|
|
parentContext, |
|
|
|
iconPrefixCls, |
|
|
|
iconPrefixCls: customIconPrefixCls, |
|
|
|
theme, |
|
|
|
componentDisabled, |
|
|
|
} = props; |
|
|
@ -171,6 +171,9 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = props => { |
|
|
|
[parentContext.getPrefixCls, props.prefixCls], |
|
|
|
); |
|
|
|
|
|
|
|
const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls; |
|
|
|
const csp = customCsp || parentContext.csp; |
|
|
|
|
|
|
|
const mergedTheme = useTheme(theme, parentContext.theme); |
|
|
|
|
|
|
|
const config = { |
|
|
@ -183,7 +186,7 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = props => { |
|
|
|
virtual, |
|
|
|
dropdownMatchSelectWidth, |
|
|
|
getPrefixCls, |
|
|
|
iconPrefixCls: iconPrefixCls ?? defaultIconPrefixCls, |
|
|
|
iconPrefixCls, |
|
|
|
theme: mergedTheme, |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ const genMentionsStyle: GenerateStyle<MentionsToken> = token => { |
|
|
|
fontSize, |
|
|
|
colorBgElevated, |
|
|
|
controlRadiusLG, |
|
|
|
boxShadow, |
|
|
|
boxShadowSecondary, |
|
|
|
} = token; |
|
|
|
|
|
|
|
const itemPaddingVertical = Math.round( |
|
|
@ -144,7 +144,7 @@ const genMentionsStyle: GenerateStyle<MentionsToken> = token => { |
|
|
|
backgroundColor: colorBgElevated, |
|
|
|
borderRadius: controlRadiusLG, |
|
|
|
outline: 'none', |
|
|
|
boxShadow, |
|
|
|
boxShadow: boxShadowSecondary, |
|
|
|
|
|
|
|
'&-hidden': { |
|
|
|
display: 'none', |
|
|
|
|
|
@ -11,15 +11,11 @@ export interface PopconfirmToken extends FullToken<'Popconfirm'> {} |
|
|
|
const genBaseStyle: GenerateStyle<PopconfirmToken> = token => { |
|
|
|
const { |
|
|
|
componentCls, |
|
|
|
paddingSM, |
|
|
|
padding, |
|
|
|
paddingXXS, |
|
|
|
iconCls, |
|
|
|
zIndexPopup, |
|
|
|
colorText, |
|
|
|
colorWarning, |
|
|
|
marginXS, |
|
|
|
marginXXS, |
|
|
|
fontSize, |
|
|
|
lineHeight, |
|
|
|
} = token; |
|
|
@ -29,13 +25,12 @@ const genBaseStyle: GenerateStyle<PopconfirmToken> = token => { |
|
|
|
zIndex: zIndexPopup, |
|
|
|
|
|
|
|
[`${componentCls}-inner-content`]: { |
|
|
|
padding: `${paddingSM}px ${padding}px`, |
|
|
|
color: colorText, |
|
|
|
}, |
|
|
|
|
|
|
|
[`${componentCls}-message`]: { |
|
|
|
position: 'relative', |
|
|
|
padding: `${paddingXXS}px 0 ${paddingSM}px`, |
|
|
|
marginBottom: marginXS, |
|
|
|
color: colorText, |
|
|
|
fontSize, |
|
|
|
display: 'flex', |
|
|
@ -57,7 +52,6 @@ const genBaseStyle: GenerateStyle<PopconfirmToken> = token => { |
|
|
|
}, |
|
|
|
|
|
|
|
[`${componentCls}-buttons`]: { |
|
|
|
marginBottom: marginXXS, |
|
|
|
textAlign: 'end', |
|
|
|
|
|
|
|
button: { |
|
|
|