-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SideNavigation: Add disable and helper text props (#3905)
- Loading branch information
1 parent
2918681
commit f28e6b3
Showing
8 changed files
with
902 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import { Box, SideNavigation } from 'gestalt'; | ||
|
||
export default function Example() { | ||
return ( | ||
<Box height="100%" width={300}> | ||
<SideNavigation accessibilityLabel="Disabled item example"> | ||
<SideNavigation.TopItem | ||
disabled | ||
href="#" | ||
icon="ads-stats" | ||
label="Reports" | ||
onClick={({ event }) => event.preventDefault()} | ||
/> | ||
<SideNavigation.Section label="Catalogs"> | ||
<SideNavigation.TopItem | ||
disabled | ||
href="#" | ||
icon="people" | ||
label="Thanksgiving" | ||
onClick={({ event }) => event.preventDefault()} | ||
subtext="Disabled thanksgiving section" | ||
/> | ||
|
||
<SideNavigation.Group expanded icon="people" label="Christmas"> | ||
<SideNavigation.NestedItem | ||
disabled | ||
href="#" | ||
label="Luxury Christmas" | ||
onClick={({ event }) => event.preventDefault()} | ||
/> | ||
|
||
<SideNavigation.NestedGroup label="Shopping Categories"> | ||
<SideNavigation.NestedItem | ||
disabled | ||
href="#" | ||
label="Gifts" | ||
onClick={({ event }) => event.preventDefault()} | ||
/> | ||
<SideNavigation.NestedItem | ||
href="#" | ||
label="Decorations" | ||
onClick={({ event }) => event.preventDefault()} | ||
/> | ||
</SideNavigation.NestedGroup> | ||
</SideNavigation.Group> | ||
</SideNavigation.Section> | ||
</SideNavigation> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import { Box, SideNavigation } from 'gestalt'; | ||
|
||
export default function Example() { | ||
return ( | ||
<Box height="100%" width={300}> | ||
<SideNavigation accessibilityLabel="Helper text items"> | ||
<SideNavigation.TopItem | ||
href="#" | ||
icon="ads-stats" | ||
label="Reports" | ||
onClick={({ event }) => event.preventDefault()} | ||
subtext="Reporting subtext" | ||
/> | ||
<SideNavigation.Section label="Audiences"> | ||
<SideNavigation.TopItem | ||
href="#" | ||
icon="people" | ||
label="Group A" | ||
onClick={({ event }) => event.preventDefault()} | ||
subtext="8.5m+ users" | ||
/> | ||
|
||
<SideNavigation.Group expanded icon="people" label="Group B"> | ||
<SideNavigation.NestedItem | ||
href="#" | ||
label="Sub audience 1" | ||
onClick={({ event }) => event.preventDefault()} | ||
subtext="2.3m+ users" | ||
/> | ||
|
||
<SideNavigation.NestedGroup label="Sub audience 2"> | ||
<SideNavigation.NestedItem | ||
href="#" | ||
label="Region 1" | ||
onClick={({ event }) => event.preventDefault()} | ||
subtext="100k+ users" | ||
/> | ||
<SideNavigation.NestedItem | ||
href="#" | ||
label="Region 2" | ||
onClick={({ event }) => event.preventDefault()} | ||
subtext="50k+ users" | ||
/> | ||
</SideNavigation.NestedGroup> | ||
</SideNavigation.Group> | ||
</SideNavigation.Section> | ||
</SideNavigation> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.