Skip to content

Commit

Permalink
chore(tooltip): update jsdoc annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mimshins committed Jan 1, 2025
1 parent f5911aa commit 749c8a5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
3 changes: 0 additions & 3 deletions packages/web-components/src/tooltip/constants.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/web-components/src/tooltip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { customElement } from "lit/decorators.js";
import { Tooltip } from "./tooltip";
import styles from "./tooltip.style";

export { Slots } from "./constants";
export * from "./events";

/**
Expand All @@ -18,8 +17,7 @@ export * from "./events";
* @prop {boolean} [no-hover-activation=false] - Whether to prevent showing tooltip on hover or not.
* @prop {boolean} [no-focus-activation=false] - Whether to prevent showing tooltip on focus or not.
* @prop {boolean} [no-escape-deactivation=false] - Whether to hide tooltip on escape or not.
*
* @slot - The default slot used for anchor element.
* @prop {string} [anchor=""] - The id of the anchor element.
*
* @fires {ShowEvent} show - Fires when the tooltip should be visible.
* @fires {HideEvent} hide - Fires when the tooltip should be hidden.
Expand Down
13 changes: 0 additions & 13 deletions packages/web-components/src/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,6 @@ export class Tooltip extends LitElement {

if (!middlewareData.arrow) return;

// const side = (this.placement.split("-") as [Side, Alignment])[0] ?? "top";

// if (!side) return;

// const sidesMap: Record<Side, Side> = {
// top: "bottom",
// right: "left",
// bottom: "top",
// left: "right",
// };

// const staticSide = sidesMap[side];

const { x: arrowX = NaN, y: arrowY = NaN } = middlewareData.arrow;

const tooltipWidth = this._tooltipElement.offsetWidth;
Expand Down

0 comments on commit 749c8a5

Please sign in to comment.