Skip to content

Commit

Permalink
Wrapped Bulma table inside of additional grid to make it responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Apr 22, 2020
1 parent cfc223c commit 5146cbe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/Blazorise.Bulma/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ private static void RegisterComponents( IComponentMapper componentMapper )
componentMapper.Register( typeof( Blazorise.Select<> ), typeof( Bulma.Select<> ) );
componentMapper.Register( typeof( Blazorise.Switch<> ), typeof( Bulma.Switch<> ) );
componentMapper.Register<Blazorise.Button, Bulma.Button>();
componentMapper.Register<Blazorise.Table, Bulma.Table>();
componentMapper.Register<Blazorise.Tabs, Bulma.Tabs>();
componentMapper.Register<Blazorise.TextEdit, Bulma.TextEdit>();
componentMapper.Register( typeof( Blazorise.TimeEdit<> ), typeof( Bulma.TimeEdit<> ) );
Expand Down
17 changes: 17 additions & 0 deletions Source/Blazorise.Bulma/Table.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@inherits Blazorise.Table
@if ( Responsive )
{
<div style="display: grid;">
<div class="@ResponsiveClassNames">
<table class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
@ChildContent
</table>
</div>
</div>
}
else
{
<table class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
@ChildContent
</table>
}

0 comments on commit 5146cbe

Please sign in to comment.