add redux in csc
This commit is contained in:
parent
a89007a81b
commit
3534919502
14 changed files with 277 additions and 12 deletions
15
my-workspace/projects/sae-lib/alert-box/alert-box.html
Normal file
15
my-workspace/projects/sae-lib/alert-box/alert-box.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<div class="alert is-{{alertKind}}">
|
||||
@if (alertKind == "warning"){
|
||||
<i class="ri-triangle-line"></i>
|
||||
}
|
||||
@if (alertKind == "danger"){
|
||||
<i class="ri-triangle-line"></i>
|
||||
}
|
||||
@if (alertKind == "error"){
|
||||
<i class="ri-triangle-line"></i>
|
||||
}
|
||||
<slot name="main">
|
||||
{{message}}
|
||||
</slot>
|
||||
<ng-content></ng-content>
|
||||
</div>
|
0
my-workspace/projects/sae-lib/alert-box/alert-box.scss
Normal file
0
my-workspace/projects/sae-lib/alert-box/alert-box.scss
Normal file
23
my-workspace/projects/sae-lib/alert-box/alert-box.spec.ts
Normal file
23
my-workspace/projects/sae-lib/alert-box/alert-box.spec.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AlertBox } from './alert-box';
|
||||
|
||||
describe('AlertBox', () => {
|
||||
let component: AlertBox;
|
||||
let fixture: ComponentFixture<AlertBox>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [AlertBox]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AlertBox);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
22
my-workspace/projects/sae-lib/alert-box/alert-box.ts
Normal file
22
my-workspace/projects/sae-lib/alert-box/alert-box.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {NgClass} from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-alert-box',
|
||||
imports: [
|
||||
],
|
||||
templateUrl: './alert-box.html',
|
||||
styleUrl: './alert-box.scss'
|
||||
})
|
||||
export class AlertBox {
|
||||
get alertKind(): string {
|
||||
return this._alertKind;
|
||||
}
|
||||
|
||||
set alertKind(value: string) {
|
||||
this._alertKind = value;
|
||||
}
|
||||
@Input() public _alertKind: string = "warning";
|
||||
@Input() public message: string = "";
|
||||
|
||||
}
|
|
@ -7,7 +7,10 @@
|
|||
"@angular/forms": "^20.1.0",
|
||||
"bulma": "^1.0.4",
|
||||
"remixicon": "^4.6.0",
|
||||
"shepherd.js": "^14.5.1"
|
||||
"shepherd.js": "^14.5.1",
|
||||
|
||||
"@ngrx/store": "^20.0.0",
|
||||
"@ngrx/store-devtools": "^20.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
|
|
|
@ -27,3 +27,4 @@
|
|||
@use '_layout_demo.scss';
|
||||
@use '_main_button.scss';
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue