feat: 🎸 Add optional icon for dropdown section (#1332)

This commit is contained in:
Zhihe Li authored and GitHub committed 2022-09-19 16:28:19 -04:00
1 parent e17db2e0d6
commit c75abc11dc
2 files changed
+6 -3

No files matched your search

@@ -18,7 +18,7 @@ A simple dropdown component with support for links and buttons.
<dropdown.separator />
<dropdown.button>Button menu item</dropdown.button>
<dropdown.separator />
<dropdown.section @title="Dropdown Section Title">
<dropdown.section @title="Dropdown Section Title" @icon="flight-icons/svg/tag-16">
<dropdown.link @route="index">Menu item</dropdown.link>
</dropdown.section>
</Rose::Dropdown>
@@ -90,7 +90,7 @@ A simple dropdown component with support for links and buttons.
<dropdown.link @route="about">Menu item</dropdown.link>
<dropdown.button>Button menu item</dropdown.button>
<dropdown.separator />
<dropdown.section @title="Dropdown Section Title">
<dropdown.section @title="Dropdown Section Title" @icon="flight-icons/svg/tag-16">
<dropdown.link @route="index">Menu item</dropdown.link>
</dropdown.section>
</Rose::Dropdown>
@@ -159,7 +159,7 @@ form fields.
<dropdown.item>
<group.checkbox
@label={{group.item.name}}
value={{group.item.id}}
value={{group.item.id}}
/>
</dropdown.item>
</Rose::Form::Checkbox::Group>
@@ -7,6 +7,9 @@
id={{concat 'dropdown-section-title-' this.id}}
class='rose-dropdown-section-title'
>
{{#if @icon}}
<Rose::Icon @name={{@icon}} @size='medium' />
{{/if}}
{{@title}}
</h2>
{{/if}}