mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(UIShell): export ref for all UIShell components
This commit is contained in:
parent
4204a10a3e
commit
d1e9fc7225
11 changed files with 82 additions and 5 deletions
|
@ -17,6 +17,12 @@
|
|||
*/
|
||||
export let icon = undefined;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the HTML button element
|
||||
* @type {null | HTMLButtonElement} [ref=null]
|
||||
*/
|
||||
export let ref = null;
|
||||
|
||||
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";
|
||||
import { Icon } from "../../Icon";
|
||||
</script>
|
||||
|
@ -24,6 +30,7 @@
|
|||
<li class:bx--side-nav__item="{true}" class:bx--side-nav__item--icon="{icon}">
|
||||
<button
|
||||
type="button"
|
||||
bind:this="{ref}"
|
||||
aria-expanded="{expanded}"
|
||||
class:bx--side-nav__submenu="{true}"
|
||||
{...$$restProps}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue