4.0.0 • Published 5 years ago
@terminus/ui-icon-button v4.0.0
Table of Contents
Installation
Packages that need to be installed
@angular/material@terminus/design-tokens@terminus/fe-utilities@terminus/ui-icon@terminus/ui-icon-button@terminus/ui-utilities
Use the ng add command to quickly install all the needed dependencies:
ng add @terminus/ui-icon-buttonModules that need to be in NgModule
TsIconButtonModule
CSS imports
In your top level stylesheet, add these imports:
@import '~@terminus/design-tokens/css/library-design-tokens.css';
@import '~@terminus/ui-styles/terminus-ui.css';Usage
Pass a valid FontAwesome icon reference:
import { faHome } from '@fortawesome/pro-solid-svg-icons/faHome';
...
public home = faHome;<ts-icon-button
[icon]="home"
(clicked)="myMethod()"
></ts-icon-button>Theme
Use the theme parameter to change the color.
<!-- Will be colored with the 'primary' color -->
<ts-icon-button theme="primary">forum</ts-icon-button>
<!-- Will be colored with the 'accent' color -->
<ts-icon-button theme="accent">forum</ts-icon-button>
<!-- Will be colored with the 'warn' color -->
<ts-icon-button theme="warn">forum</ts-icon-button>By default the icon will use the library base text color.
Accessibility
For accessibility purposes we should set the actionName and buttonType.
actionNamecan be one of theTsButtonActionTypesand will be used for thearia-label.buttonTypecan be one of theTsButtonFunctionTypesand will be used for thetypeattribute.
<ts-icon-button
actionName="Menu"
buttonType="button"
(clicked)="myMethod()"
>bookmark</ts-icon-button>4.0.0
5 years ago
3.0.4
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.1.2
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.10
5 years ago
2.0.9
5 years ago
2.0.8
5 years ago
2.0.7
5 years ago
2.0.6
5 years ago
2.0.5
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.0.1
5 years ago