fix: overlay docs error: 'return' outside of function (#1887)

This commit is contained in:
Ahmet Yeşil 2023-01-23 12:57:20 +01:00 committed by GitHub
parent a5330c922c
commit 87e565caeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View file

@ -0,0 +1,5 @@
---
'@lion/ui': patch
---
fix: overlay docs error: 'return' outside of function

View file

@ -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.
```js preview-story
const tooltipConfig = { ...withTooltipConfig() };
export const usingTooltipConfig = () => {
const tooltipConfig = { ...withTooltipConfig() };
return html`
<demo-el-using-overlaymixin id="tooltip" .config=${tooltipConfig}>
<button slot="invoker">Hover me to open the tooltip!</button>
<div slot="content" class="demo-overlay">Hello!</div>
</demo-el-using-overlaymixin>
`;
return html`
<demo-el-using-overlaymixin id="tooltip" .config=${tooltipConfig}>
<button slot="invoker">Hover me to open the tooltip!</button>
<div slot="content" class="demo-overlay">Hello!</div>
</demo-el-using-overlaymixin>
`;
};
```
## trapsKeyboardFocus