design-system-react
design-system-react copied to clipboard
App Launcher section expand/collapse optional
In the instance there is only one section to show expand/collapse is unnecessary
https://github.com/salesforce-ux/design-system-react/blob/master/components/app-launcher/section.jsx#L97-L103
I guess we could do a check on the number of children. Make sure they are sections though to future proof it.
children ?= sections
Yep.
<AppLauncher
triggerName="App Name"
onSearch={this.onSearch}
isOpen={this.state.appLauncherOpen}
triggerOnClick={this.toggleAppLauncher}
onClose={this.toggleAppLauncher}
>
<AppLauncherSection
title="All Items"
isOpen={this.state.allItemsSectionIsOpen}
onToggleClick={this.toggleSection}
>
<DemoAppLauncherTile search={this.state.search} />
<DemoAppLauncherTileWithIconNode search={this.state.search} />
<DemoAppLauncherTileWithIconText search={this.state.search} />
</AppLauncherSection>
<AppLauncherSection title="All Apps">
<DemoAppLauncherTile search={this.state.search} />
<DemoAppLauncherTileWithTruncatedText search={this.state.search} />
</AppLauncherSection>
</AppLauncher>
cool that would do it