-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FluentGrid] Add FluentGridItem with no breakpoints (#862)
* Add FluentGridItem with no breakpoints * Add Unit Tests
- Loading branch information
Showing
16 changed files
with
182 additions
and
78 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
12 changes: 12 additions & 0 deletions
12
examples/Demo/Shared/Pages/Grid/Examples/GridMessage.razor
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,12 @@ | ||
<FluentGrid Justify="JustifyContent.FlexEnd" | ||
Style="background-color: var(--neutral-layer-3); overflow: auto; resize: horizontal;"> | ||
<FluentGridItem Style="min-width: 200px;"> | ||
<FluentLabel> | ||
Views must be setup in the Admin Portal to use this client application hosted by my company. | ||
</FluentLabel> | ||
</FluentGridItem> | ||
<FluentGridItem Justify="JustifyContent.FlexEnd" Gap="10px"> | ||
<FluentButton Appearance="Appearance.Neutral">Setup</FluentButton> | ||
<FluentButton Appearance="Appearance.Neutral">Documentation</FluentButton> | ||
</FluentGridItem> | ||
</FluentGrid> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@namespace Microsoft.Fast.Components.FluentUI | ||
@inherits FluentComponentBase | ||
|
||
<div class="@ClassValue" style="@StyleValue" xs=@xs sm=@sm md=@md lg=@lg xl=@xl xxl=@xxl @attributes="AdditionalAttributes"> | ||
<div class="@ClassValue" style="@StyleValue" xs="@(NoBreakpointsDefined() ? 0 : xs)" sm=@sm md=@md lg=@lg xl=@xl xxl=@xxl @attributes="AdditionalAttributes"> | ||
@ChildContent | ||
</div> |
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
4 changes: 1 addition & 3 deletions
4
...ridTests.FluentGrid_Default.verified.html → ...ts.FluentGrid_Default.verified.razor.html
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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
|
||
<div class="fluent-grid" style="justify-content: flex-start;" spacing="0" b-ljlkesaj3r=""> | ||
<b>render me</b> | ||
</div> | ||
<div class="fluent-grid" style="justify-content: flex-start;" spacing="3" b-ljlkesaj3r="">My content</div> |
4 changes: 4 additions & 0 deletions
4
tests/Core/Grid/FluentGridTests.FluentGrid_Items_AllBreakpoints.verified.razor.html
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,4 @@ | ||
|
||
<div class="fluent-grid" style="justify-content: flex-start;" spacing="3" b-ljlkesaj3r=""> | ||
<div xs="1" sm="2" md="3" lg="4" xl="5" xxl="6">My cell</div> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
tests/Core/Grid/FluentGridTests.FluentGrid_Items_Default.verified.razor.html
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,5 @@ | ||
|
||
<div class="fluent-grid" style="justify-content: flex-start;" spacing="3" b-ljlkesaj3r=""> | ||
<div xs="6" md="6">Cell 1</div> | ||
<div xs="6" md="6">Cell 2</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
tests/Core/Grid/FluentGridTests.FluentGrid_Items_JustifyGap.verified.razor.html
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,4 @@ | ||
|
||
<div class="fluent-grid" style="justify-content: flex-start;" spacing="3" b-ljlkesaj3r=""> | ||
<div style="justify-content: center; display: flex; gap: 10px;" xs="1">My cell</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
tests/Core/Grid/FluentGridTests.FluentGrid_Items_NoBreapoint.verified.razor.html
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,4 @@ | ||
|
||
<div class="fluent-grid" style="justify-content: flex-start;" spacing="3" b-ljlkesaj3r=""> | ||
<div style="min-width: 200px;" xs="0">My cell</div> | ||
</div> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Grid/FluentGridTests.FluentGrid_SpacingJustify.verified.razor.html
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,2 @@ | ||
|
||
<div class="fluent-grid" style="justify-content: center;" spacing="5" b-ljlkesaj3r="">My content</div> |
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,77 @@ | ||
@using Xunit; | ||
@inherits TestContext | ||
@code | ||
{ | ||
[Fact] | ||
public void FluentGrid_Default() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentGrid>My content</FluentGrid>); | ||
|
||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentGrid_SpacingJustify() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentGrid Spacing="5" Justify="JustifyContent.Center">My content</FluentGrid>); | ||
|
||
//Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentGrid_Items_Default() | ||
{ | ||
// Arrange && Act | ||
var cut = Render( | ||
@<FluentGrid> | ||
<FluentGridItem xs="6" md="6">Cell 1</FluentGridItem> | ||
<FluentGridItem xs="6" md="6">Cell 2</FluentGridItem> | ||
</FluentGrid>); | ||
|
||
//Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentGrid_Items_AllBreakpoints() | ||
{ | ||
// Arrange && Act | ||
var cut = Render( | ||
@<FluentGrid> | ||
<FluentGridItem xs="1" sm="2" md="3" lg="4" xl="5" xxl="6">My cell</FluentGridItem> | ||
</FluentGrid>); | ||
|
||
//Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentGrid_Items_JustifyGap() | ||
{ | ||
// Arrange && Act | ||
var cut = Render( | ||
@<FluentGrid> | ||
<FluentGridItem xs="1" Justify="JustifyContent.Center" Gap="10px">My cell</FluentGridItem> | ||
</FluentGrid>); | ||
|
||
//Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentGrid_Items_NoBreapoint() | ||
{ | ||
// Arrange && Act | ||
var cut = Render( | ||
@<FluentGrid> | ||
<FluentGridItem Style="min-width: 200px;">My cell</FluentGridItem> | ||
</FluentGrid>); | ||
|
||
//Assert | ||
cut.Verify(); | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
tests/Core/_ToDo/Grid/FluentGridItemTests.FluentGridItem_Default.verified.html
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.