feat(tooltip): support align prop from carbon-components v10.25 (#446)

This commit is contained in:
Eric Liu 2020-12-05 09:04:53 -08:00 committed by GitHub
commit 222c7f2899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 71 additions and 27 deletions

View file

@ -3356,7 +3356,7 @@
{ "type": "forwarded", "name": "mouseleave", "element": "table" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "table" },
"rest_props": { "type": "Element", "name": "div" },
"extends": {
"interface": "DataTableHeader",
"import": "\"../DataTable/DataTable\""
@ -9274,6 +9274,16 @@
"moduleName": "Tooltip",
"filePath": "/src/Tooltip/Tooltip.svelte",
"props": [
{
"name": "align",
"kind": "let",
"description": "Set the alignment of the tooltip relative to the icon",
"type": "\"start\" | \"center\" | \"end\"",
"value": "\"center\"",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "direction",
"kind": "let",

View file

@ -6,8 +6,8 @@
### Default (icon-only, "bottom" direction)
<Tooltip>
<p>
<Tooltip tooltipBodyId="tooltip-body">
<p id="tooltip-body">
Resources are provisioned based on your account's organization.
</p>
</Tooltip>
@ -27,6 +27,12 @@
<Tooltip triggerText="Bottom" direction="bottom"><p>Bottom</p></Tooltip>
<Tooltip triggerText="Left" direction="left"><p>Left</p></Tooltip>
### Alignment
<Tooltip triggerText="Start" align="start"><p>Start</p></Tooltip>
<Tooltip triggerText="End" align="end"><p>End</p></Tooltip>
<Tooltip triggerText="Center" align="center"><p>Center</p></Tooltip>
### Interactive
<Tooltip triggerText="Resource list">