mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 13:53:03 -05:00
feat(challenge13): create challenge 13 about styling
This commit is contained in:
16
apps/styling/src/app/text.component.ts
Normal file
16
apps/styling/src/app/text.component.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'text',
|
||||
standalone: true,
|
||||
template: `
|
||||
<p style="font-size: {{ font }}px; color: {{ color }}">
|
||||
<ng-content></ng-content>
|
||||
</p>
|
||||
`,
|
||||
})
|
||||
export class TextComponent {
|
||||
@Input() font = 10;
|
||||
@Input() color = 'black';
|
||||
}
|
||||
Reference in New Issue
Block a user