-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUES CLOSED: #662
- Loading branch information
Showing
8 changed files
with
99 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
mat-card.mat-card { | ||
border-radius: map-get($card-theme, border-radius); | ||
} | ||
|
||
$card-theme: ( | ||
border-radius: $border-radius | ||
); | ||
23 changes: 23 additions & 0 deletions
23
packages/stark-ui/src/common/classes/abstract-component.ts
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,23 @@ | ||
import { OnInit, Input, Renderer2, ElementRef } from "@angular/core"; | ||
|
||
/** | ||
* Abstract class to add the right stark class color to the elementRef | ||
*/ | ||
export abstract class AbstractStarkUiComponent implements OnInit { | ||
/** | ||
* Color theme | ||
*/ | ||
@Input() | ||
protected color?: string; | ||
|
||
protected constructor(protected renderer: Renderer2, protected elementRef: ElementRef) {} | ||
|
||
/** | ||
* Component lifecycle hook | ||
*/ | ||
public ngOnInit(): void { | ||
if (this.color) { | ||
this.renderer.addClass(this.elementRef.nativeElement, "stark-" + this.color); | ||
} | ||
} | ||
} |
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