Browse Source

chore: code enhance

pull/35420/head
MadCcc 3 years ago
parent
commit
e9f22cf192
  1. 6
      components/tooltip/style/index.tsx

6
components/tooltip/style/index.tsx

@ -65,6 +65,8 @@ const genTooltipStyle: GenerateStyle<TooltipToken, CSSObject> = token => {
boxShadow, boxShadow,
} = token; } = token;
const tooltipBgColor = new TinyColor(tooltipBg);
return { return {
[componentCls]: { [componentCls]: {
...resetComponent(token), ...resetComponent(token),
@ -129,8 +131,8 @@ const genTooltipStyle: GenerateStyle<TooltipToken, CSSObject> = token => {
'&-content': { '&-content': {
'--antd-arrow-background-color': `linear-gradient(to right bottom, ${new TinyColor( '--antd-arrow-background-color': `linear-gradient(to right bottom, ${new TinyColor(
tooltipBg, tooltipBgColor,
).setAlpha(0.65)}, ${tooltipBg})`, ).setAlpha(tooltipBgColor.getAlpha() - 0.1)}, ${tooltipBg})`,
position: 'absolute', position: 'absolute',
top: 0, // FIXME: hardcode in v4 top: 0, // FIXME: hardcode in v4
insetInlineEnd: 0, // FIXME: hardcode in v4 insetInlineEnd: 0, // FIXME: hardcode in v4

Loading…
Cancel
Save