<!-- PTooltip.stories.mdx -->

import { Meta, Story, Preview, Props, ArgsTable } from '@storybook/addon-docs';

<Meta title="MDX/Tooltip" />

# Tooltip

<br/>
<h4 style={{fontFamily: '-apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif'
}}>
    Tooltips are floating labels that briefly explain the function of a user interface element. They can be triggered when
    merchants hover, focus, tap, or click.
</h4>
<br/>

### Code

```js
v-p-tooltip="'Hello'"
```

### Example

```html
<span
    v-p-tooltip="'This order has shipping labels.'"
>
  Order #1001
</span>
```

### API

<table style={{width: '100%', textAlign: 'center'}}>
    <thead>
        <tr>
            <td><b>Position</b></td>
            <td><b>Description</b></td>
            <td><b>Directive</b></td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>above</td>
            <td>Tooltip on the top of the element.</td>
            <td><code>v-p-tooltip.above</code></td>
        </tr>
        <tr>
            <td>mostSpace</td>
            <td>Get auto position for the tooltip.</td>
            <td><code>v-p-tooltip.mostSpace</code></td>
        </tr>
        <tr>
            <td>below (Default)</td>
            <td>Tooltip on the below of the element.</td>
            <td><code>v-p-tooltip</code> or <code>v-p-tooltip.below</code></td>
        </tr>
    </tbody>
</table>