mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
fix(ui-shell): remove iconDescription prop from HeaderNavMenu #566
Fixes #566
This commit is contained in:
parent
9dd0e954f1
commit
db3e84b0e5
4 changed files with 8 additions and 31 deletions
|
@ -1663,12 +1663,11 @@ None.
|
|||
### Props
|
||||
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :-------------- | :--------------- | :------- | :----------------------------------------- | ------------------------------ | --------------------------------------------- |
|
||||
| :-------- | :--------------- | :------- | :----------------------------------------- | ------------------ | --------------------------------------------- |
|
||||
| ref | <code>let</code> | Yes | <code>null | HTMLAnchorElement</code> | <code>null</code> | Obtain a reference to the HTML anchor element |
|
||||
| expanded | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to toggle the expanded state |
|
||||
| href | <code>let</code> | No | <code>string</code> | <code>"/"</code> | Specify the `href` attribute |
|
||||
| text | <code>let</code> | No | <code>string</code> | -- | Specify the text |
|
||||
| iconDescription | <code>let</code> | No | <code>string</code> | <code>"Expand/Collapse"</code> | Specify the ARIA label for the chevron icon |
|
||||
|
||||
### Slots
|
||||
|
||||
|
|
|
@ -4057,16 +4057,6 @@
|
|||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": true
|
||||
},
|
||||
{
|
||||
"name": "iconDescription",
|
||||
"kind": "let",
|
||||
"description": "Specify the ARIA label for the chevron icon",
|
||||
"type": "string",
|
||||
"value": "\"Expand/Collapse\"",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
}
|
||||
],
|
||||
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
/** Specify the ARIA label for the chevron icon */
|
||||
export let iconDescription = "Expand/Collapse";
|
||||
|
||||
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";
|
||||
</script>
|
||||
|
||||
|
@ -32,7 +29,7 @@
|
|||
}}"
|
||||
/>
|
||||
|
||||
<li class:bx--header__submenu="{true}" title="{iconDescription}">
|
||||
<li class:bx--header__submenu="{true}">
|
||||
<a
|
||||
bind:this="{ref}"
|
||||
role="menuitem"
|
||||
|
@ -59,10 +56,7 @@
|
|||
on:blur
|
||||
>
|
||||
{text}
|
||||
<ChevronDown16
|
||||
aria-label="{iconDescription}"
|
||||
class="bx--header__menu-arrow"
|
||||
/>
|
||||
<ChevronDown16 class="bx--header__menu-arrow" />
|
||||
</a>
|
||||
<ul role="menu" aria-label="{text}" class:bx--header__menu="{true}">
|
||||
<slot />
|
||||
|
|
|
@ -25,12 +25,6 @@ export interface HeaderNavMenuProps
|
|||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLAnchorElement;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label for the chevron icon
|
||||
* @default "Expand/Collapse"
|
||||
*/
|
||||
iconDescription?: string;
|
||||
}
|
||||
|
||||
export default class HeaderNavMenu extends SvelteComponentTyped<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue