|
| 1 | +--- |
| 2 | +title: Button Tests |
| 3 | +--- |
| 4 | +{% extends 'test.njk' %} |
| 5 | +{% block content %} |
| 6 | + <section> |
| 7 | + <nav class="hxBreadcrumb"> |
| 8 | + <a href="components/buttons">Buttons</a> |
| 9 | + <hx-icon class="delimiter" type="angle-right"></hx-icon> |
| 10 | + <a href="#">{{page.title}}</a> |
| 11 | + </nav> |
| 12 | + </section> |
| 13 | + |
| 14 | + {% set variants = [ |
| 15 | + { label: 'Primary', style: 'hxPrimary' }, |
| 16 | + { label: 'Secondary', style: '' }, |
| 17 | + { label: 'Tertiary', style: 'hxTertiary' } |
| 18 | + ] %} |
| 19 | + {% set sizes = [ |
| 20 | + { label: 'SM', style: 'hxSm' }, |
| 21 | + { label: 'MD', style: '' }, |
| 22 | + { label: 'LG', style: 'hxLg' } |
| 23 | + ] %} |
| 24 | + {% set inputTypes = [ 'button', 'submit', 'reset' ] %} |
| 25 | + |
| 26 | + <!-- Button Element --> |
| 27 | + <section> |
| 28 | + <h3>Button Element</h3> |
| 29 | + <p>Using: <code><button></code></p> |
| 30 | + <table class="hxTable hxTable--condensed"> |
| 31 | + {% for _variant in variants %} |
| 32 | + <tbody> |
| 33 | + {% for _size in sizes %} |
| 34 | + <tr> |
| 35 | + <td>{{_variant.label}} Button ({{_size.label}})</td> |
| 36 | + <td><button class="hxBtn {{_variant.style}} {{_size.style}}">Normal</button></td> |
| 37 | + <td><button class="hxBtn {{_variant.style}} {{_size.style}} pseudo-focus">Focused</button></td> |
| 38 | + <td><button class="hxBtn {{_variant.style}} {{_size.style}} pseudo-hover">Hover</button></td> |
| 39 | + <td><button class="hxBtn {{_variant.style}} {{_size.style}} pseudo-active">Pressed</button></td> |
| 40 | + <td><button class="hxBtn {{_variant.style}} {{_size.style}}" disabled>Disabled</button></td> |
| 41 | + </tr> |
| 42 | + {% endfor %} |
| 43 | + </tbody> |
| 44 | + {% endfor %} |
| 45 | + </table> |
| 46 | + </section> |
| 47 | + |
| 48 | + <!-- Anchor Element --> |
| 49 | + <section> |
| 50 | + <h3>Anchor Element</h3> |
| 51 | + <p>Using: <code><a></code></p> |
| 52 | + <table class="hxTable hxTable--condensed"> |
| 53 | + {% for _variant in variants %} |
| 54 | + <tbody> |
| 55 | + {% for _size in sizes %} |
| 56 | + <tr> |
| 57 | + <td>{{_variant.label}} Anchor ({{_size.label}})</td> |
| 58 | + <td><a class="hxBtn {{_variant.style}} {{_size.style}}">Normal</a></td> |
| 59 | + <td><a class="hxBtn {{_variant.style}} {{_size.style}} pseudo-focus">Focused</a></td> |
| 60 | + <td><a class="hxBtn {{_variant.style}} {{_size.style}} pseudo-hover">Hover</a></td> |
| 61 | + <td><a class="hxBtn {{_variant.style}} {{_size.style}} pseudo-active">Pressed</a></td> |
| 62 | + <td><a class="hxBtn {{_variant.style}} {{_size.style}}" disabled>Disabled</a></td> |
| 63 | + </tr> |
| 64 | + {% endfor %} |
| 65 | + </tbody> |
| 66 | + {% endfor %} |
| 67 | + </table> |
| 68 | + </section> |
| 69 | + |
| 70 | + <!-- Link Element --> |
| 71 | + <section> |
| 72 | + <h3>Link Element</h3> |
| 73 | + <p>Using: <code><a href="#"></code></p> |
| 74 | + <table class="hxTable hxTable--condensed"> |
| 75 | + {% for _variant in variants %} |
| 76 | + <tbody> |
| 77 | + {% for _size in sizes %} |
| 78 | + <tr> |
| 79 | + <td>{{_variant.label}} Anchor ({{_size.label}})</td> |
| 80 | + <td><a href="#" class="hxBtn {{_variant.style}} {{_size.style}}">Normal</a></td> |
| 81 | + <td><a href="#" class="hxBtn {{_variant.style}} {{_size.style}} pseudo-focus">Focused</a></td> |
| 82 | + <td><a href="#" class="hxBtn {{_variant.style}} {{_size.style}} pseudo-hover">Hover</a></td> |
| 83 | + <td><a href="#" class="hxBtn {{_variant.style}} {{_size.style}} pseudo-active">Pressed</a></td> |
| 84 | + <td><a href="#" class="hxBtn {{_variant.style}} {{_size.style}}" disabled>Disabled</a></td> |
| 85 | + </tr> |
| 86 | + {% endfor %} |
| 87 | + </tbody> |
| 88 | + {% endfor %} |
| 89 | + </table> |
| 90 | + </section> |
| 91 | + |
| 92 | + <!-- Input Element --> |
| 93 | + {% for _type in inputTypes %} |
| 94 | + <section> |
| 95 | + <h2>{{_type | title}} Input Element</h2> |
| 96 | + <p>Using: <code><input type="{{_type}}" /></code></p> |
| 97 | + <table class="hxTable hxTable--condensed"> |
| 98 | + {% for _variant in variants %} |
| 99 | + <tbody> |
| 100 | + {% for _size in sizes %} |
| 101 | + <tr> |
| 102 | + <td>{{_variant.label}} Anchor ({{_size.label}})</td> |
| 103 | + <td><input type="{{_type}}" class="hxBtn {{_variant.style}} {{_size.style}}" value="Normal"/></td> |
| 104 | + <td><input type="{{_type}}" class="hxBtn {{_variant.style}} {{_size.style}} pseudo-focus" value="Focused"/></td> |
| 105 | + <td><input type="{{_type}}" class="hxBtn {{_variant.style}} {{_size.style}} pseudo-hover" value="Hover"/></td> |
| 106 | + <td><input type="{{_type}}" class="hxBtn {{_variant.style}} {{_size.style}} pseudo-active" value="Pressed"/></td> |
| 107 | + <td><input type="{{_type}}" class="hxBtn {{_variant.style}} {{_size.style}}" disabled value="Disabled"/></td> |
| 108 | + </tr> |
| 109 | + {% endfor %} |
| 110 | + </tbody> |
| 111 | + {% endfor %} |
| 112 | + </table> |
| 113 | + </section> |
| 114 | + {% endfor %} |
| 115 | +{% endblock %} |
0 commit comments