Skip to content

Commit

Permalink
remove wedge-points-to-center option
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBusshoff committed Jan 2, 2025
1 parent a2bb99f commit ae0eea1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const type = computed(() => {
:open="props.open"
:color="props.color"
:position="props.position"
wedge-points-to-center
>
<template #default="{ trigger }">
<button type="button" class="onyx-info-tooltip__trigger" v-bind="trigger">
Expand All @@ -43,7 +42,6 @@ const type = computed(() => {
:open="props.open"
:color="props.color"
:position="props.position"
wedge-points-to-center
>
<template #default="{ trigger }">
<span class="onyx-info-tooltip__trigger" v-bind="trigger">
Expand Down
18 changes: 5 additions & 13 deletions packages/sit-onyx/src/components/OnyxTooltip/OnyxTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const props = withDefaults(defineProps<OnyxTooltipProps>(), {
fitParent: false,
open: "hover",
alignment: "auto",
wedgePointsToCenter: false,
});
defineSlots<{
Expand Down Expand Up @@ -79,7 +78,6 @@ const tooltipClasses = computed(() => {
"onyx-tooltip--danger": props.color === "danger",
"onyx-tooltip--success": props.color === "success",
"onyx-tooltip--fit-parent": props.fitParent,
"onyx-tooltip--wedge-points-to-center": props.wedgePointsToCenter,
"onyx-tooltip--hidden": !isVisible.value,
[`onyx-tooltip--${openDirection.value}`]: props.position === "auto",
[`onyx-tooltip--${props.position}`]: props.position !== "auto",
Expand Down Expand Up @@ -222,24 +220,18 @@ $wedge-size: 0.5rem;
}
&--left {
left: 0%;
transform: none;
&.onyx-tooltip--wedge-points-to-center {
left: 50%;
transform: translateX(-2 * $wedge-size);
}
left: 50%;
transform: translateX(-2 * $wedge-size);
&::after {
left: 2 * $wedge-size;
}
}
&--right {
left: 100%;
transform: translateX(-100%);
&.onyx-tooltip--wedge-points-to-center {
left: 50%;
transform: translateX(calc(-100% + 2 * $wedge-size));
}
left: 50%;
transform: translateX(calc(-100% + 2 * $wedge-size));
&::after {
left: calc(100% - 2 * $wedge-size);
}
Expand Down
4 changes: 0 additions & 4 deletions packages/sit-onyx/src/components/OnyxTooltip/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ export type OnyxTooltipProps = DensityProp & {
* See also: https://inclusive-components.design/tooltips-toggletips/
*/
open?: TooltipOpen;
/**
* Whether the wedge (tooltip arrow) points to the center of the parent element.
*/
wedgePointsToCenter?: boolean;
};

export const TOOLTIP_POSITIONS = ["top", "bottom", "auto"] as const;
Expand Down

0 comments on commit ae0eea1

Please sign in to comment.