add submenu-icon part

pull/1336/head
Cory LaViska 2023-05-04 10:17:41 -04:00
rodzic 429b47963b
commit b1bdedd3a3
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
## Next
- Added the `checkbox` part and related exported parts to `<sl-tree-item>` so you can target it with CSS [#1318](https://github.com/shoelace-style/shoelace/discussions/1318)
- Added the `submenu-icon` part to `<sl-menu-item>` (submenus have not been implemented yet, but this part is required to allow customizations)
- Fixed a bug where changing the size of `<sl-radio-group>` wouldn't update the size of child elements
- Improved `<sl-button>` so it can accept children of variable heights [#1317](https://github.com/shoelace-style/shoelace/pull/1317)
- Improved the docs to more clearly explain sizing radios and radio buttons

Wyświetl plik

@ -25,6 +25,7 @@ import type { CSSResultGroup } from 'lit';
* @csspart prefix - The prefix container.
* @csspart label - The menu item label.
* @csspart suffix - The suffix container.
* @csspart submenu-icon - The submenu icon, visible only when the menu item has a submenu (not yet implemented).
*/
@customElement('sl-menu-item')
export default class SlMenuItem extends ShoelaceElement {
@ -141,7 +142,7 @@ export default class SlMenuItem extends ShoelaceElement {
<slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
<span class="menu-item__chevron">
<span part="submenu-icon" class="menu-item__chevron">
<sl-icon name="chevron-right" library="system" aria-hidden="true"></sl-icon>
</span>
</div>