-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(svg): .svg as components, .svg imports
- Loading branch information
1 parent
6749a23
commit ed32ad1
Showing
26 changed files
with
84 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({selector: 'icon-error', template: require('./images/error.svg')}) | ||
|
||
export class IconErrorComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({selector: 'icon-eye', template: require('./images/eye.svg')}) | ||
|
||
export class IconEyeComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({selector: 'icon-load', template: require('./images/load.svg')}) | ||
|
||
export class IconLoadComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {Component, Input} from '@angular/core'; | ||
|
||
export class Colors { | ||
public static blue: string = '#4C99FC'; | ||
public static yellow: string = '#fdf300'; | ||
public static gray: string = '#7e7e7e'; | ||
} | ||
|
||
@Component({ | ||
selector: 'icon-rank', | ||
template: ` | ||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" *ngIf="maxRank > 1" class="rank" width="30" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg"> | ||
<defs> | ||
<radialGradient cy="10%" fy="0%" id="radialGradient"> | ||
<stop offset="0%" [attr.stop-color]="color"/> | ||
<stop offset="100%" stop-color="#000"/> | ||
</radialGradient> | ||
</defs> | ||
<rect x="0" y="0" width="30" height="16"/> | ||
<rect x="7" y="1" width="16" height="14" opacity="0.7" fill="url(#radialGradient)"/> | ||
<rect x="1" y="1" width="28" height="14" [attr.stroke]="color" fill="none" stroke-width="1"/> | ||
<text x="15" y="12" [attr.fill]="color" text-anchor="middle" font-size="12">{{rank + '/' + maxRank}}</text> | ||
</svg>` | ||
}) | ||
|
||
export class IconRankComponent { | ||
@Input() rank: number; | ||
@Input() maxRank: number; | ||
@Input() color: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({selector: 'icon-refresh', template: require('./images/refresh.svg')}) | ||
|
||
export class IconRefreshComponent { | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters