|
@@ -1,8 +1,7 @@
|
|
|
-import * as colors from 'tailwindcss/colors';
|
|
|
+import { NgClass } from '@angular/common';
|
|
|
import * as i0 from '@angular/core';
|
|
|
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
|
|
|
|
-/** @type {import('tailwindcss').Config} */
|
|
|
const tailwindPreset = {
|
|
|
theme: {
|
|
|
extend: {
|
|
@@ -12,7 +11,6 @@ const tailwindPreset = {
|
|
|
title: 'var(--font-title)',
|
|
|
},
|
|
|
colors: {
|
|
|
- ...colors,
|
|
|
primary: {
|
|
|
DEFAULT: 'rgb(var(--primary) / <alpha-value>)',
|
|
|
dark: 'rgb(var(--priamry-dark) / <alpha-value>)',
|
|
@@ -68,11 +66,11 @@ class ButtonComponent {
|
|
|
this.type = 'default';
|
|
|
}
|
|
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
|
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: ButtonComponent, isStandalone: true, selector: "ct-button", inputs: { text: "text", type: "type" }, ngImport: i0, template: "<button class=\"bg-yellow-400 p-4\">{{ text }}</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: ButtonComponent, isStandalone: true, selector: "ct-button", inputs: { text: "text", type: "type" }, ngImport: i0, template: "<button\n [ngClass]=\"{\n 'bg-primary': type === 'default',\n 'bg-on-primary': type === 'alternate',\n 'bg-yellow-400': type === 'warning',\n 'bg-red-400': type === 'error',\n 'bg-green-400': type === 'success'\n }\"\n class=\"p-4\">\n {{ text }}\n</button>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
}
|
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
|
type: Component,
|
|
|
- args: [{ selector: 'ct-button', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"bg-yellow-400 p-4\">{{ text }}</button>\n" }]
|
|
|
+ args: [{ selector: 'ct-button', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [ngClass]=\"{\n 'bg-primary': type === 'default',\n 'bg-on-primary': type === 'alternate',\n 'bg-yellow-400': type === 'warning',\n 'bg-red-400': type === 'error',\n 'bg-green-400': type === 'success'\n }\"\n class=\"p-4\">\n {{ text }}\n</button>\n" }]
|
|
|
}], propDecorators: { text: [{
|
|
|
type: Input,
|
|
|
args: [{ required: true }]
|