fix: overlay docs error: 'return' outside of function (#1887)
This commit is contained in:
parent
a5330c922c
commit
87e565caeb
2 changed files with 14 additions and 7 deletions
5
.changeset/green-elephants-jog.md
Normal file
5
.changeset/green-elephants-jog.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/ui': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: overlay docs error: 'return' outside of function
|
||||||
|
|
@ -77,14 +77,16 @@ As specified in the [overlay rationale](./rationale.md) there are only two offic
|
||||||
Since most overlays have interactive content the default is set to dialogs. To get a tooltip, you can add `isTooltip` to the config object. This only works for local placement and it also needs to have `handlesAccessibility` activated to work.
|
Since most overlays have interactive content the default is set to dialogs. To get a tooltip, you can add `isTooltip` to the config object. This only works for local placement and it also needs to have `handlesAccessibility` activated to work.
|
||||||
|
|
||||||
```js preview-story
|
```js preview-story
|
||||||
const tooltipConfig = { ...withTooltipConfig() };
|
export const usingTooltipConfig = () => {
|
||||||
|
const tooltipConfig = { ...withTooltipConfig() };
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<demo-el-using-overlaymixin id="tooltip" .config=${tooltipConfig}>
|
<demo-el-using-overlaymixin id="tooltip" .config=${tooltipConfig}>
|
||||||
<button slot="invoker">Hover me to open the tooltip!</button>
|
<button slot="invoker">Hover me to open the tooltip!</button>
|
||||||
<div slot="content" class="demo-overlay">Hello!</div>
|
<div slot="content" class="demo-overlay">Hello!</div>
|
||||||
</demo-el-using-overlaymixin>
|
</demo-el-using-overlaymixin>
|
||||||
`;
|
`;
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## trapsKeyboardFocus
|
## trapsKeyboardFocus
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue