ECL 工具提示组件
npm 软件包 : @ecl/tooltip
npm install --save @ecl/tooltip
属性 :
工具提示需要其中之一:
- "数据-电子工具" (字符串)(默认为:""): 启用工具提示并提供其内容
- "数据-ecl-tooltip-倒数" (字符串)(默认为:""): 启用倒转工具提示, 在暗黑的浅滩上可见, 并提供其内容
可选属性 :
- "标题" (字符串)(默认为:""): 如果提供, 将复制到数据- ecl- 工具提示或数据- ecl- 工具提示倒置
示例
<a
href="#"
class="ecl-link"
data-ecl-tooltip="Tooltip content"
>
Link with tooltip
</a>
<a
href="#"
class="ecl-link"
data-ecl-tooltip-inverted="Tooltip content"
>
Link with tooltip inverted
</a>
<button
class="ecl-button ecl-button--primary"
data-ecl-tooltip
title="Tooltip content"
>
Button with tooltip (using title)
</button>
<button
class="ecl-button ecl-button--primary"
data-ecl-tooltip-inverted
title="Tooltip content"
>
Button with tooltip inverted (using title)
</button>