| 1 | # Action button allows icon customization |
| 2 | |
| 3 | Code |
| 4 | actionButton("foo", "Click me") |
| 5 | Output |
| 6 | <button id="foo" type="button" class="btn btn-default action-button"><span class="action-label">Click me</span></button> |
| 7 | |
| 8 | --- |
| 9 | |
| 10 | Code |
| 11 | actionButton("foo", "Click me", icon = icon("star")) |
| 12 | Output |
| 13 | <button id="foo" type="button" class="btn btn-default action-button"><span class="action-icon"><i class="far fa-star" role="presentation" aria-label="star icon"></i></span><span class="action-label">Click me</span></button> |
| 14 | |
| 15 | # actionLink uses .noWS to prevent underline rendering issues |
| 16 | |
| 17 | Code |
| 18 | actionLink("foo", "Click me") |
| 19 | Output |
| 20 | <a id="foo" href="#" class="action-button action-link"><span class="action-label">Click me</span></a> |
| 21 | |
| 22 | --- |
| 23 | |
| 24 | Code |
| 25 | actionLink("foo", "Click me", icon = icon("star")) |
| 26 | Output |
| 27 | <a id="foo" href="#" class="action-button action-link"><span class="action-icon"><i class="far fa-star" role="presentation" aria-label="star icon"></i></span><span class="action-label">Click me</span></a> |
| 28 |