-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to markup a dropdown menu in button group #56
Comments
I could create the desired UI by following markup, but it looks creepy... <div class="slds-button-group" role="group">
<button class="slds-button slds-button--neutral">Save</button>
<div class="slds-dropdown-trigger">
<div class="slds-button-group">
<button class="slds-button" style="display: none"></button>
<button class="slds-button slds-button--icon-border-filled">
<svg aria-hidden="true" class="slds-button__icon">
<use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
</svg>
<span class="slds-assistive-text">More Actions</span>
</button>
</div>
<div class="slds-dropdown slds-dropdown--left slds-text-heading--label slds-dropdown--menu">
<ul class="slds-dropdown__list" role="menu">
<li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Save as</a></li>
<li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Delete</a></li>
</ul>
</div>
</div>
</div> |
Hi @stomita, you'll need to add the class Cheers! |
Thanks @stefsullrew, it surely solves. I'll write down the updated markup here for later reference. <div class="slds-button-group" role="group">
<button class="slds-button slds-button--neutral">Save</button>
<div class="slds-dropdown-trigger slds-button--last">
<button class="slds-button slds-button--icon-border-filled">
<svg aria-hidden="true" class="slds-button__icon">
<use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
</svg>
<span class="slds-assistive-text">More Actions</span>
</button>
<div class="slds-dropdown slds-dropdown--left slds-text-heading--label slds-dropdown--menu">
<ul class="slds-dropdown__list" role="menu">
<li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Save as</a></li>
<li href="#" class="slds-dropdown__item"><a href="#" class="slds-truncate" role="menuitem">Delete</a></li>
</ul>
</div>
</div>
</div> |
fixed picklist width on datepicker
I can create a button with dropdown menu and there are examples of markup in official page.
But when it comes to set a dropdown menu button in button group, it seems there is no example.
I tried following:
But the result includes spacer in buttons (not grouped).
Is there any correct way to achieve the UI ?
The text was updated successfully, but these errors were encountered: