mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-23 18:50:06 +08:00
fix: Modify Tooltip placements config (#37960)
* fix: Modify Tooltip placements config * fix: Modify Tooltip placements verticalArrowShift * fix: sync tooltip & popover arrow offset * fix: modify dropdown arrow width --------- Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
4bc4d7a46e
commit
59fef7d790
@ -38,7 +38,7 @@ export function getOverflowOptions(autoAdjustOverflow?: boolean | AdjustOverflow
|
||||
|
||||
export default function getPlacements(config: PlacementsConfig) {
|
||||
const {
|
||||
arrowWidth = 4,
|
||||
arrowWidth = 5,
|
||||
horizontalArrowShift = 16,
|
||||
verticalArrowShift = 8,
|
||||
autoAdjustOverflow,
|
||||
|
@ -214,6 +214,9 @@ const Tooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
|
||||
return (
|
||||
builtinPlacements ||
|
||||
getPlacements({
|
||||
arrowWidth: 11,
|
||||
horizontalArrowShift: 16,
|
||||
verticalArrowShift: 12,
|
||||
arrowPointAtCenter,
|
||||
autoAdjustOverflow,
|
||||
})
|
||||
|
@ -8,8 +8,8 @@
|
||||
@tooltip-arrow-rotate-width: sqrt(@tooltip-arrow-width * @tooltip-arrow-width * 2) +
|
||||
@tooltip-arrow-shadow-width * 2;
|
||||
|
||||
@tooltip-arrow-offset-vertical: 5px; // 8 - 3px
|
||||
@tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
|
||||
@tooltip-arrow-offset-vertical: 12px;
|
||||
@tooltip-arrow-offset-horizontal: 16px;
|
||||
|
||||
// Base class
|
||||
.@{tooltip-prefix-cls} {
|
||||
|
Loading…
Reference in New Issue
Block a user