File tree Expand file tree Collapse file tree 9 files changed +102
-1
lines changed
cypress/integration/visual-regression
visual-regression/src/app/components Expand file tree Collapse file tree 9 files changed +102
-1
lines changed Original file line number Diff line number Diff line change
1
+ version : 1
2
+ snapshot :
3
+ widths : [1280]
Original file line number Diff line number Diff line change
1
+ describe ( `Icon Component` , ( ) => {
2
+ it ( `should load the icon page` , ( ) => {
3
+ cy . visit ( 'http://localhost:4200/components/button' ) ;
4
+ cy . percySnapshot ( 'Icon: all icons' ) ;
5
+ } ) ;
6
+ } ) ;
Original file line number Diff line number Diff line change 12
12
//
13
13
.ts-icon {
14
14
@include reset ;
15
+ $icon-height : 24px ;
16
+
15
17
display : inline-block ;
18
+ height : $icon-height ;
16
19
17
20
& .ts-icon--inline {
18
21
$margin : spacing (small , 2 );
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { FlexLayoutModule } from '@angular/flex-layout';
4
4
import { FormsModule } from '@angular/forms' ;
5
5
import { TsButtonModule } from '@terminus/ui/button' ;
6
6
import { TsCardModule } from '@terminus/ui/card' ;
7
- import { TsChipModule } from " @terminus/ui/chip" ;
7
+ import { TsChipModule } from ' @terminus/ui/chip' ;
8
8
import { TsIconModule } from '@terminus/ui/icon' ;
9
9
import { TsSpacingModule } from '@terminus/ui/spacing' ;
10
10
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ export const componentsList: Routes = [
15
15
path : 'chip' ,
16
16
loadChildren : ( ) => import ( './chip/chip.module' ) . then ( m => m . ChipModule ) ,
17
17
} ,
18
+ {
19
+ path : 'icon' ,
20
+ loadChildren : ( ) => import ( './icon/icon.module' ) . then ( m => m . IconModule ) ,
21
+ } ,
18
22
{
19
23
path : 'input' ,
20
24
loadChildren : ( ) => import ( './input/input.module' ) . then ( m => m . InputModule ) ,
Original file line number Diff line number Diff line change
1
+ import { NgModule } from '@angular/core' ;
2
+ import {
3
+ RouterModule ,
4
+ Routes ,
5
+ } from '@angular/router' ;
6
+
7
+ import { IconComponent } from './icon.component' ;
8
+
9
+
10
+ const routes : Routes = [
11
+ {
12
+ path : '' ,
13
+ component : IconComponent ,
14
+ } ,
15
+ ] ;
16
+
17
+ @NgModule ( {
18
+ imports : [ RouterModule . forChild ( routes ) ] ,
19
+ exports : [ RouterModule ] ,
20
+ } )
21
+ export class IconRoutingModule { }
Original file line number Diff line number Diff line change
1
+ < div style ="margin: 20px ">
2
+ < ts-icon > home</ ts-icon >
3
+ < ts-icon > wallpaper</ ts-icon >
4
+ < ts-icon theme ="accent "> storage</ ts-icon >
5
+ < ts-icon theme ="warn "> open_in_new</ ts-icon >
6
+ < ts-icon svgIcon ="csv "> </ ts-icon >
7
+ < ts-icon svgIcon ="engage " theme ="primary "> </ ts-icon >
8
+ < ts-icon svgIcon ="lightbulb " theme ="accent "> </ ts-icon >
9
+ < ts-icon svgIcon ="logo " theme ="warn "> </ ts-icon >
10
+ < ts-icon svgIcon ="logo_color "> </ ts-icon >
11
+ < br >
12
+ < br >
13
+
14
+ < ts-icon theme ="primary " [background] ="true "> brightness_medium</ ts-icon >
15
+ < ts-icon theme ="accent " [background] ="true "> storage</ ts-icon >
16
+ < ts-icon theme ="warn " [background] ="true "> hourglass_empty</ ts-icon >
17
+ < ts-icon svgIcon ="logo " theme ="primary " [background] ="true "> </ ts-icon >
18
+ < ts-icon svgIcon ="csv " theme ="accent " [background] ="true "> </ ts-icon >
19
+ < ts-icon [background] ="true "> brightness_medium</ ts-icon >
20
+ < br >
21
+ < br >
22
+
23
+ < div >
24
+ Test me out
25
+ < ts-icon [inline] ="true "> home</ ts-icon >
26
+ for horizontal rhythm
27
+ < ts-icon [inline] ="true "> queue</ ts-icon >
28
+ to make sure
29
+ < ts-icon [inline] ="true "> add_alarm</ ts-icon >
30
+ everything looks fine.
31
+ < ts-icon [inline] ="true "> open_in_new</ ts-icon >
32
+ </ div >
33
+ </ div >
Original file line number Diff line number Diff line change
1
+ import { Component } from '@angular/core' ;
2
+
3
+ @Component ( {
4
+ selector : 'app-icon' ,
5
+ templateUrl : './icon.component.html' ,
6
+ } )
7
+ export class IconComponent {
8
+ }
Original file line number Diff line number Diff line change
1
+ import { CommonModule } from '@angular/common' ;
2
+ import { NgModule } from '@angular/core' ;
3
+ import { TsCardModule } from '@terminus/ui/card' ;
4
+ import { TsIconModule } from '@terminus/ui/icon' ;
5
+ import { TsSpacingModule } from '@terminus/ui/spacing' ;
6
+
7
+ import { IconRoutingModule } from './icon-routing.module' ;
8
+ import { IconComponent } from './icon.component' ;
9
+
10
+
11
+ @NgModule ( {
12
+ imports : [
13
+ CommonModule ,
14
+ IconRoutingModule ,
15
+ TsCardModule ,
16
+ TsIconModule ,
17
+ TsSpacingModule ,
18
+ ] ,
19
+ declarations : [
20
+ IconComponent ,
21
+ ] ,
22
+ } )
23
+ export class IconModule { }
You can’t perform that action at this time.
0 commit comments