@synergy-design-system/react
Version:
React wrappers for the Synergy Design System
45 lines (44 loc) • 2.61 kB
TypeScript
import Component from '@synergy-design-system/components/components/tooltip/tooltip.component.js';
import { type EventName } from '@lit/react';
import type { SynShowEvent } from '@synergy-design-system/components';
import type { SynAfterShowEvent } from '@synergy-design-system/components';
import type { SynHideEvent } from '@synergy-design-system/components';
import type { SynAfterHideEvent } from '@synergy-design-system/components';
/**
* @summary Tooltips display additional information based on a specific action.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-tooltip--docs
* @status stable
* @since 2.0
*
* @dependency syn-popup
*
* @slot - The tooltip's target element. Avoid slotting in more than one element, as subsequent ones will be ignored.
* @slot content - The content to render in the tooltip. Alternatively, you can use the `content` attribute.
*
* @event syn-show - Emitted when the tooltip begins to show.
* @event syn-after-show - Emitted after the tooltip has shown and all animations are complete.
* @event syn-hide - Emitted when the tooltip begins to hide.
* @event syn-after-hide - Emitted after the tooltip has hidden and all animations are complete.
*
* @csspart base - The component's base wrapper, an `<syn-popup>` element.
* @csspart base__popup - The popup's exported `popup` part. Use this to target the tooltip's popup container.
* @csspart base__arrow - The popup's exported `arrow` part. Use this to target the tooltip's arrow.
* @csspart body - The tooltip's body where its content is rendered.
*
* @cssproperty --max-width - The maximum width of the tooltip before its content will wrap.
* @cssproperty --hide-delay - The amount of time to wait before hiding the tooltip when hovering.
* @cssproperty --show-delay - The amount of time to wait before showing the tooltip when hovering.
*
* @animation tooltip.show - The animation to use when showing the tooltip.
* @animation tooltip.hide - The animation to use when hiding the tooltip.
*/
export declare const SynTooltip: import("@lit/react").ReactWebComponent<Component, {
onSynShow: EventName<SynShowEvent>;
onSynAfterShow: EventName<SynAfterShowEvent>;
onSynHide: EventName<SynHideEvent>;
onSynAfterHide: EventName<SynAfterHideEvent>;
}>;
export type { SynShowEvent } from '@synergy-design-system/components';
export type { SynAfterShowEvent } from '@synergy-design-system/components';
export type { SynHideEvent } from '@synergy-design-system/components';
export type { SynAfterHideEvent } from '@synergy-design-system/components';