mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(ui-shell): make HeaderNavItem
slottable (#1693)
This commit is contained in:
parent
8b57f235f2
commit
b9aaa3adca
4 changed files with 13 additions and 4 deletions
|
@ -1697,7 +1697,9 @@ None.
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
None.
|
| Slot name | Default | Props | Fallback |
|
||||||
|
| :-------- | :------ | :---- | :------------------ |
|
||||||
|
| -- | Yes | -- | <code>{text}</code> |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
|
|
@ -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" },
|
||||||
|
|
|
@ -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>
|
||||||
|
|
2
types/UIShell/HeaderNavItem.svelte.d.ts
vendored
2
types/UIShell/HeaderNavItem.svelte.d.ts
vendored
|
@ -40,5 +40,5 @@ export default class HeaderNavItem extends SvelteComponentTyped<
|
||||||
focus: WindowEventMap["focus"];
|
focus: WindowEventMap["focus"];
|
||||||
blur: WindowEventMap["blur"];
|
blur: WindowEventMap["blur"];
|
||||||
},
|
},
|
||||||
{}
|
{ default: {} }
|
||||||
> {}
|
> {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue