Support dropdown on page header title
The page header title should support an optional element for switching views. For example, in this SLDS example clicking on "My Leads" should display a dropdown with additional views to switch to.
See example in GUS for this behavior as well.
@plumlee-sf SLDS team told me that this popover/menu/search thing is paired with the page header heading. https://latest-208.lightningdesignsystem.com/components/menus#flavor-dynamic-list-10-plus-items
Although, I'm considering just doing a dropdown or picklist to start off simple.
@mbeard Here is exactly what you want. I will probably write a wrapper for page headers that will have all these props as defaults, but this should work for you if you want a dropdown.
The page header icon still needs to be added, of course.
<PageHeader
contentRight={contentRight}
iconAssistiveText="User"
iconCategory="standard"
iconName="lead"
info="10 items • sorted by name"
label="Leads"
navRight={navRight}
title={<h1 className="slds-page-header__title slds-p-right--x-small">
<Dropdown
options={[
{ label: 'Menu Item One', value: 'A0' },
{ label: 'Menu Item Two', value: 'B0' },
{ label: 'Menu Item Three', value: 'C0' },
{ type: 'divider' },
{ label: 'Menu Item Four', value: 'D0' }
]}
>
<DropdownTrigger>
<Button
className="slds-button--reset slds-type-focus"
iconName="down"
iconPosition="right"
label="Dropdown"
responsive
variant="base"
/>
</DropdownTrigger>
</Dropdown>
</h1>}
truncate
variant="objectHome"
/>
Adding features are the responsibility of the consuming product team. Please follow up if any B2C UXE or SLDS decisions need to be made.