feat(ui-shell): make HeaderNavItem slottable (#1693)

This commit is contained in:
Pierre 2023-05-03 01:23:04 +02:00 committed by GitHub
commit b9aaa3adca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 4 deletions

View file

@ -1697,7 +1697,9 @@ None.
### Slots ### Slots
None. | Slot name | Default | Props | Fallback |
| :-------- | :------ | :---- | :------------------ |
| -- | Yes | -- | <code>{text}</code> |
### Events ### Events

View file

@ -5122,7 +5122,14 @@
} }
], ],
"moduleExports": [], "moduleExports": [],
"slots": [], "slots": [
{
"name": "__default__",
"default": true,
"fallback": "{text}",
"slot_props": "{}"
}
],
"events": [ "events": [
{ "type": "forwarded", "name": "click", "element": "a" }, { "type": "forwarded", "name": "click", "element": "a" },
{ "type": "forwarded", "name": "mouseover", "element": "a" }, { "type": "forwarded", "name": "mouseover", "element": "a" },

View file

@ -61,6 +61,6 @@
} }
}}" }}"
> >
<span class:bx--text-truncate--end="{true}">{text}</span> <span class:bx--text-truncate--end="{true}"><slot>{text}</slot></span>
</a> </a>
</li> </li>

View file

@ -40,5 +40,5 @@ export default class HeaderNavItem extends SvelteComponentTyped<
focus: WindowEventMap["focus"]; focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"]; blur: WindowEventMap["blur"];
}, },
{} { default: {} }
> {} > {}