mirror of https://github.com/abpframework/abp.git
2 changed files with 305 additions and 0 deletions
@ -0,0 +1,288 @@ |
|||||
|
@page |
||||
|
@model Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components.ButtonGroupsModel |
||||
|
@{ |
||||
|
ViewData["Title"] = "ButtonGroups"; |
||||
|
} |
||||
|
|
||||
|
@section styles { |
||||
|
<abp-style-bundle> |
||||
|
<abp-style src="/css/demo.css" /> |
||||
|
</abp-style-bundle> |
||||
|
} |
||||
|
|
||||
|
@section scripts { |
||||
|
<abp-script-bundle> |
||||
|
@*<abp-script src="/libs/highlight.js/lib/highlight.js" /> |
||||
|
<abp-script src="/Pages/Components/highlightCode.js" />*@ |
||||
|
</abp-script-bundle> |
||||
|
} |
||||
|
|
||||
|
<link rel="stylesheet" |
||||
|
href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css"> |
||||
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script> |
||||
|
<script>hljs.initHighlightingOnLoad();</script> |
||||
|
|
||||
|
<h2>Button groups</h2> |
||||
|
|
||||
|
<p>Based on <a href="https://getbootstrap.com/docs/4.1/components/button-group/" target="_blank"> Bootstrap Button group</a>.</p> |
||||
|
|
||||
|
<h4>Basic example</h4> |
||||
|
|
||||
|
<div class="demo-with-code"> |
||||
|
<div class="demo-area"> |
||||
|
|
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">Left</abp-button> |
||||
|
<abp-button button-type="Secondary">Middle</abp-button> |
||||
|
<abp-button button-type="Secondary">Right</abp-button> |
||||
|
</abp-button-group> |
||||
|
</div> |
||||
|
<div class="code-area"> |
||||
|
<abp-tabs> |
||||
|
<abp-tab title="Tag Helper"> |
||||
|
<pre><code> |
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">Left</abp-button> |
||||
|
<abp-button button-type="Secondary">Middle</abp-button> |
||||
|
<abp-button button-type="Secondary">Right</abp-button> |
||||
|
</abp-button-group> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
<abp-tab title="Rendered"> |
||||
|
<pre><code> |
||||
|
<div class="btn-group" role="group"> |
||||
|
<button type="button" class="btn btn-secondary">Left</button> |
||||
|
<button type="button" class="btn btn-secondary">Middle</button> |
||||
|
<button type="button" class="btn btn-secondary">Right</button> |
||||
|
</div> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
</abp-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<h4>Button toolbar</h4> |
||||
|
|
||||
|
<div class="demo-with-code"> |
||||
|
<div class="demo-area"> |
||||
|
<abp-button-toolbar> |
||||
|
<abp-button-group class="mr-2"> |
||||
|
<abp-button button-type="Secondary">1</abp-button> |
||||
|
<abp-button button-type="Secondary">2</abp-button> |
||||
|
<abp-button button-type="Secondary">3</abp-button> |
||||
|
<abp-button button-type="Secondary">4</abp-button> |
||||
|
</abp-button-group> |
||||
|
<abp-button-group class="mr-2"> |
||||
|
<abp-button button-type="Secondary">5</abp-button> |
||||
|
<abp-button button-type="Secondary">6</abp-button> |
||||
|
<abp-button button-type="Secondary">7</abp-button> |
||||
|
</abp-button-group> |
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">8</abp-button> |
||||
|
</abp-button-group> |
||||
|
</abp-button-toolbar> |
||||
|
</div> |
||||
|
<div class="code-area"> |
||||
|
<abp-tabs> |
||||
|
<abp-tab title="Tag Helper"> |
||||
|
<pre><code> |
||||
|
<abp-button-toolbar> |
||||
|
<abp-button-group class="mr-2"> |
||||
|
<abp-button button-type="Secondary">1</abp-button> |
||||
|
<abp-button button-type="Secondary">2</abp-button> |
||||
|
<abp-button button-type="Secondary">3</abp-button> |
||||
|
<abp-button button-type="Secondary">4</abp-button> |
||||
|
</abp-button-group> |
||||
|
<abp-button-group class="mr-2"> |
||||
|
<abp-button button-type="Secondary">5</abp-button> |
||||
|
<abp-button button-type="Secondary">6</abp-button> |
||||
|
<abp-button button-type="Secondary">7</abp-button> |
||||
|
</abp-button-group> |
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">8</abp-button> |
||||
|
</abp-button-group> |
||||
|
</abp-button-toolbar> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
<abp-tab title="Rendered"> |
||||
|
<pre><code> |
||||
|
<div class="btn-toolbar" role="toolbar"> |
||||
|
<div class="btn-group mr-2" role="group"> |
||||
|
<button type="button" class="btn btn-secondary">1</button> |
||||
|
<button type="button" class="btn btn-secondary">2</button> |
||||
|
<button type="button" class="btn btn-secondary">3</button> |
||||
|
<button type="button" class="btn btn-secondary">4</button> |
||||
|
</div> |
||||
|
<div class="btn-group mr-2" role="group"> |
||||
|
<button type="button" class="btn btn-secondary">5</button> |
||||
|
<button type="button" class="btn btn-secondary">6</button> |
||||
|
<button type="button" class="btn btn-secondary">7</button> |
||||
|
</div> |
||||
|
<div class="btn-group" role="group"> |
||||
|
<button type="button" class="btn btn-secondary">8</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
</abp-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<h4>Sizing</h4> |
||||
|
|
||||
|
<div class="demo-with-code"> |
||||
|
<div class="demo-area"> |
||||
|
<abp-button-group size="Large"> |
||||
|
<abp-button button-type="Secondary">Left</abp-button> |
||||
|
<abp-button button-type="Secondary">Middle</abp-button> |
||||
|
<abp-button button-type="Secondary">Right</abp-button> |
||||
|
</abp-button-group> |
||||
|
<br><br> |
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">Left</abp-button> |
||||
|
<abp-button button-type="Secondary">Middle</abp-button> |
||||
|
<abp-button button-type="Secondary">Right</abp-button> |
||||
|
</abp-button-group> |
||||
|
<br><br> |
||||
|
<abp-button-group size="Small"> |
||||
|
<abp-button button-type="Secondary">Left</abp-button> |
||||
|
<abp-button button-type="Secondary">Middle</abp-button> |
||||
|
<abp-button button-type="Secondary">Right</abp-button> |
||||
|
</abp-button-group> |
||||
|
</div> |
||||
|
<div class="code-area"> |
||||
|
<abp-tabs> |
||||
|
<abp-tab title="Tag Helper"> |
||||
|
<pre><code> |
||||
|
<abp-button-group size="Large"> |
||||
|
... |
||||
|
</abp-button-group> |
||||
|
|
||||
|
<abp-button-group> |
||||
|
... |
||||
|
</abp-button-group> |
||||
|
|
||||
|
<abp-button-group size="Small"> |
||||
|
... |
||||
|
</abp-button-group> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
<abp-tab title="Rendered"> |
||||
|
<pre><code> |
||||
|
<div class="btn-group btn-group-lg" role="group"> |
||||
|
... |
||||
|
</div> |
||||
|
|
||||
|
<div class="btn-group" role="group"> |
||||
|
... |
||||
|
</div> |
||||
|
|
||||
|
<div class="btn-group btn-group-sm" role="group"> |
||||
|
... |
||||
|
</div> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
</abp-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<h4>Vertical variation</h4> |
||||
|
|
||||
|
<div class="demo-with-code"> |
||||
|
<div class="demo-area"> |
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">1</abp-button> |
||||
|
<abp-button button-type="Secondary">2</abp-button> |
||||
|
<abp-dropdown> |
||||
|
<abp-dropdown-button button-type="Secondary" text="Dropdown" /> |
||||
|
<abp-dropdown-menu> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
</abp-dropdown-menu> |
||||
|
</abp-dropdown> |
||||
|
</abp-button-group> |
||||
|
</div> |
||||
|
<div class="code-area"> |
||||
|
<abp-tabs> |
||||
|
<abp-tab title="Tag Helper"> |
||||
|
<pre><code> |
||||
|
<abp-button-group> |
||||
|
<abp-button button-type="Secondary">1</abp-button> |
||||
|
<abp-button button-type="Secondary">2</abp-button> |
||||
|
<abp-dropdown> |
||||
|
<abp-dropdown-button button-type="Secondary" text="Dropdown" /> |
||||
|
<abp-dropdown-menu> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
</abp-dropdown-menu> |
||||
|
</abp-dropdown> |
||||
|
</abp-button-group> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
<abp-tab title="Rendered"> |
||||
|
<pre><code> |
||||
|
<div class="btn-group" role="group" aria-label="Button group with nested dropdown"> |
||||
|
<button type="button" class="btn btn-secondary">1</button> |
||||
|
<button type="button" class="btn btn-secondary">2</button> |
||||
|
|
||||
|
<div class="btn-group" role="group"> |
||||
|
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
||||
|
Dropdown |
||||
|
</button> |
||||
|
<div class="dropdown-menu" aria-labelledby="btnGroupDrop1"> |
||||
|
<a class="dropdown-item" href="#">Dropdown link</a> |
||||
|
<a class="dropdown-item" href="#">Dropdown link</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
</abp-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<h4>Nesting</h4> |
||||
|
|
||||
|
<div class="demo-with-code"> |
||||
|
<div class="demo-area"> |
||||
|
<abp-button-group direction="Vertical"> |
||||
|
<abp-button button-type="Secondary">button</abp-button> |
||||
|
<abp-button button-type="Secondary">button</abp-button> |
||||
|
<abp-dropdown direction="Right"> |
||||
|
<abp-dropdown-button button-type="Secondary" text="Dropdown" /> |
||||
|
<abp-dropdown-menu> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
</abp-dropdown-menu> |
||||
|
</abp-dropdown> |
||||
|
<abp-button button-type="Secondary">button</abp-button> |
||||
|
<abp-button button-type="Secondary">button</abp-button> |
||||
|
<abp-dropdown direction="Left"> |
||||
|
<abp-dropdown-button button-type="Secondary" text="Dropdown" /> |
||||
|
<abp-dropdown-menu> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item> |
||||
|
</abp-dropdown-menu> |
||||
|
</abp-dropdown> |
||||
|
<abp-button button-type="Secondary">button</abp-button> |
||||
|
</abp-button-group> |
||||
|
</div> |
||||
|
<div class="code-area"> |
||||
|
<abp-tabs> |
||||
|
<abp-tab title="Tag Helper"> |
||||
|
<pre><code> |
||||
|
<abp-button-group direction="Vertical"> |
||||
|
... |
||||
|
</abp-button-group> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
<abp-tab title="Rendered"> |
||||
|
<pre><code> |
||||
|
<div class="btn-group-vertical"> |
||||
|
... |
||||
|
</div> |
||||
|
</code></pre> |
||||
|
</abp-tab> |
||||
|
</abp-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components |
||||
|
{ |
||||
|
public class ButtonGroupsModel : PageModel |
||||
|
{ |
||||
|
public void OnGet() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue