@shopware-ag/meteor-component-library
Version:
The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).
34 lines (33 loc) • 1.58 kB
TypeScript
import { ObjectDirective } from 'vue';
/**
* Directive for tooltips
* Usage:
* v-tooltip="{configuration}"
* // configuration options:
* message: The text to be displayed.
* position: Position of the tooltip relative to the original element(top, bottom etc.).
* width: The width of the tooltip.
* showDelay: The delay before the tooltip is shown when the original element is hovered.
* hideDelay: The delay before the tooltip is removed when the original element is not hovered.
* disabled: Disables the tooltip and it wont be shown.
* appearance: Sets a additional css class "mt-tooltip--$appearance" for styling
* showOnDisabledElements: Shows the tooltip also if the original element is disabled. To achieve
* this a wrapper div element is created around the original element because the original element
* prevents mouse events when disabled.
*
* Examples:
* // tooltip with default width of 200px and default position top:
* v-tooltip="'Some text'"
* // tooltip with position bottom by modifier:
* v-tooltip.bottom="'Some text'"
* // tooltip with position bottom and width 300px:
* v-tooltip="{ message: 'Some Text', width: 200, position: 'bottom' }"
* // Alternative tooltip with position bottom and width 300px:
* v-tooltip.bottom="{ message: 'Some Text', width: 200 }"
* // adjusting the delay:
* v-tooltip.bottom="{ message: 'Some Text', width: 200, showDelay: 200, hideDelay: 300 }"
*
* *Note that the position variable has a higher priority as the modifier
*/
declare const _default: ObjectDirective;
export default _default;