fix: Slider tooltip text not align center (#43430)

* style: support centering text in tooltip in slider

* fix: formatting code
This commit is contained in:
Jomorx 2023-07-07 18:58:54 +08:00 committed by GitHub
parent 7d9429ba75
commit 2f0c82f59d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ interface SliderToken extends FullToken<'Slider'> {
// =============================== Base ===============================
const genBaseStyle: GenerateStyle<SliderToken> = (token) => {
const { componentCls, controlSize, dotSize, marginFull, marginPart, colorFillContentHover } =
const { componentCls, antCls, controlSize, dotSize, marginFull, marginPart, colorFillContentHover } =
token;
return {
@ -256,6 +256,10 @@ const genBaseStyle: GenerateStyle<SliderToken> = (token) => {
cursor: `not-allowed !important`,
},
},
[`&-tooltip ${antCls}-tooltip-inner`]:{
minWidth: "unset",
},
},
};
};