-
Notifications
You must be signed in to change notification settings - Fork 461
Allow NavMenuGroup to specify custom icon content to appear in collapsed Nav Menu (Fixes #467) #470
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
Merged
vnbaaij
merged 9 commits into
microsoft:new-components
from
mrpmorris:467/PeteM-CustomNavGutterIconForMenuGroup
Jun 20, 2023
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
dff1c60
Add NavigationIconContent to FluentNavMenu (Fixes #463)
mrpmorris c40bbbd
Merge branch 'new-components' of https://github.com/microsoft/fluentu…
mrpmorris 81cd63a
Icon + Expanded icon
mrpmorris 610606b
Revert "Icon + Expanded icon"
mrpmorris f293eff
Show group icon when nav menu is collapsed
mrpmorris cda41c6
Remove sub-menu item added to sample.
mrpmorris e36dc93
Cascading parameters don't need to be public??
mrpmorris d82799d
Exposure tidying
mrpmorris 23cac6e
Include example
mrpmorris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 19 additions & 14 deletions
33
examples/FluentUI.Demo.Shared/Microsoft.Fast.Components.FluentUI.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
examples/FluentUI.Demo.Shared/Pages/NavMenu/Examples/NavMenuCustomIconContent.razor
This file contains hidden or 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,65 @@ | ||
| @namespace FluentUI.Demo.Shared | ||
|
|
||
| <h2>Custom Icon Content Example</h2> | ||
|
|
||
| <FluentStack Orientation="Orientation.Horizontal" Width="100%"> | ||
| <div> | ||
| <FluentNavMenu @bind-Expanded="@Expanded" Width="150"> | ||
| <NavigationIconContent>⛚</NavigationIconContent> | ||
| <ChildContent> | ||
| <FluentNavMenuGroup Text="Weather"> | ||
| <NavMenuGutterIconContent>☀</NavMenuGutterIconContent> | ||
| <ChildContent> | ||
| <FluentNavMenuLink Text="Sunny"> | ||
| <IconContent>☀</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Cloudy"> | ||
| <IconContent>☁</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Rain"> | ||
| <IconContent>☂</IconContent> | ||
| </FluentNavMenuLink> | ||
| </ChildContent> | ||
| </FluentNavMenuGroup> | ||
| <FluentNavMenuGroup Text="Notes"> | ||
| <NavMenuGutterIconContent>♬</NavMenuGutterIconContent> | ||
| <ChildContent> | ||
| <FluentNavMenuLink Text="Quarter"> | ||
| <IconContent>♩</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Eigth"> | ||
| <IconContent>♪</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Sixteenth"> | ||
| <IconContent>♬</IconContent> | ||
| </FluentNavMenuLink> | ||
| </ChildContent> | ||
| </FluentNavMenuGroup> | ||
| <FluentNavMenuLink Text="Item 4" Disabled> | ||
| <IconContent>☹</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Contact us"> | ||
| <IconContent>☎</IconContent> | ||
| </FluentNavMenuLink> | ||
| </ChildContent> | ||
| </FluentNavMenu> | ||
| </div> | ||
| <div style="width: 100%;"> | ||
|
|
||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce quis lorem lacus. | ||
| Ut id leo non enim feugiat ultrices. Proin vulputate volutpat urna nec iaculis. | ||
| Integer dui lacus, fermentum sit amet aliquet in, scelerisque vitae dui. | ||
| Nulla fringilla sagittis orci eu consectetur. Fusce eget dolor non lectus placerat | ||
| tincidunt. Pellentesque aliquam non odio ac porttitor. Nam finibus mattis sagittis. | ||
| Ut hendrerit porttitor massa in aliquam. Duis laoreet fringilla feugiat. | ||
| Sed maximus, urna in fringilla posuere, enim urna bibendum justo, vel molestie nibh orci nec lectus. | ||
| Etiam a varius justo. Aenean nisl ante, interdum eget vulputate eget, iaculis ut massa. | ||
| Suspendisse maximus sed purus id molestie. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
|
|
||
| </div> | ||
| </FluentStack> | ||
|
|
||
| @code | ||
| { | ||
| bool Expanded = true; | ||
| } |
This file contains hidden or 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 hidden or 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
65 changes: 65 additions & 0 deletions
65
examples/FluentUI.Demo.Shared/wwwroot/sources/NavMenuCustomIconContent.razor.txt
This file contains hidden or 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,65 @@ | ||
| @namespace FluentUI.Demo.Shared | ||
|
|
||
| <h2>Custom Icon Content Example</h2> | ||
|
|
||
| <FluentStack Orientation="Orientation.Horizontal" Width="100%"> | ||
| <div> | ||
| <FluentNavMenu @bind-Expanded="@Expanded" Width="150"> | ||
| <NavigationIconContent>⛚</NavigationIconContent> | ||
| <ChildContent> | ||
| <FluentNavMenuGroup Text="Weather"> | ||
| <NavMenuGutterIconContent>☀</NavMenuGutterIconContent> | ||
| <ChildContent> | ||
| <FluentNavMenuLink Text="Sunny"> | ||
| <IconContent>☀</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Cloudy"> | ||
| <IconContent>☁</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Rain"> | ||
| <IconContent>☂</IconContent> | ||
| </FluentNavMenuLink> | ||
| </ChildContent> | ||
| </FluentNavMenuGroup> | ||
| <FluentNavMenuGroup Text="Notes"> | ||
| <NavMenuGutterIconContent>♬</NavMenuGutterIconContent> | ||
| <ChildContent> | ||
| <FluentNavMenuLink Text="Quarter"> | ||
| <IconContent>♩</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Eigth"> | ||
| <IconContent>♪</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Sixteenth"> | ||
| <IconContent>♬</IconContent> | ||
| </FluentNavMenuLink> | ||
| </ChildContent> | ||
| </FluentNavMenuGroup> | ||
| <FluentNavMenuLink Text="Item 4" Disabled> | ||
| <IconContent>☹</IconContent> | ||
| </FluentNavMenuLink> | ||
| <FluentNavMenuLink Text="Contact us"> | ||
| <IconContent>☎</IconContent> | ||
| </FluentNavMenuLink> | ||
| </ChildContent> | ||
| </FluentNavMenu> | ||
| </div> | ||
| <div style="width: 100%;"> | ||
|
|
||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce quis lorem lacus. | ||
| Ut id leo non enim feugiat ultrices. Proin vulputate volutpat urna nec iaculis. | ||
| Integer dui lacus, fermentum sit amet aliquet in, scelerisque vitae dui. | ||
| Nulla fringilla sagittis orci eu consectetur. Fusce eget dolor non lectus placerat | ||
| tincidunt. Pellentesque aliquam non odio ac porttitor. Nam finibus mattis sagittis. | ||
| Ut hendrerit porttitor massa in aliquam. Duis laoreet fringilla feugiat. | ||
| Sed maximus, urna in fringilla posuere, enim urna bibendum justo, vel molestie nibh orci nec lectus. | ||
| Etiam a varius justo. Aenean nisl ante, interdum eget vulputate eget, iaculis ut massa. | ||
| Suspendisse maximus sed purus id molestie. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
|
|
||
| </div> | ||
| </FluentStack> | ||
|
|
||
| @code | ||
| { | ||
| bool Expanded = true; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.