diff --git a/src/action-tooltip.d.ts b/src/action-tooltip.d.ts index 4e5c84d..31917dc 100644 --- a/src/action-tooltip.d.ts +++ b/src/action-tooltip.d.ts @@ -5,7 +5,7 @@ export interface TooltipActionProps { * The action to trigger the tooltip * @default 'hover' */ - action: 'hover' | 'click' | 'prop' | string; + action?: 'hover' | 'click' | 'prop' | string; /** * The alignment of the tooltip. diff --git a/src/helpers.js b/src/helpers.js index c3c2cff..bb31383 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -85,12 +85,6 @@ export const computeTooltipPosition = ( const elementPosition = computedStyle.position; const currentRect = currentElement.getBoundingClientRect(); - // if (elementPosition === 'static') { - // currentElement = currentElement.parentElement; - // continue; - // } - - // console.log() if (elementPosition === 'fixed') { fixedOffsetTop += currentRect.top + window.scrollY; diff --git a/src/tooltip.d.ts b/src/tooltip.d.ts index d2db619..f756887 100644 --- a/src/tooltip.d.ts +++ b/src/tooltip.d.ts @@ -5,7 +5,7 @@ export interface TooltipProps { * The action to trigger the tooltip * @default 'hover' */ - action: 'hover' | 'click' | 'prop' | string; + action?: 'hover' | 'click' | 'prop' | string; /** * The alignment of the tooltip.