feat: nwaifu-ui lib with btn
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<button [disabled]="disabled" [type]="type"><ng-content></ng-content></button>
|
||||
23
nwaifu-ui/src/lib/components/button/button.component.scss
Normal file
23
nwaifu-ui/src/lib/components/button/button.component.scss
Normal file
@@ -0,0 +1,23 @@
|
||||
button {
|
||||
outline: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background-color: #5b3f45;
|
||||
padding: 1em 1.5em;
|
||||
color: #f5f6fa;
|
||||
border-radius: 15px;
|
||||
transition: ease-in-out 0.2s;
|
||||
margin: 2rem;
|
||||
&:hover,
|
||||
&:active {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
&:hover,
|
||||
&:active {
|
||||
cursor: not-allowed;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
15
nwaifu-ui/src/lib/components/button/button.component.ts
Normal file
15
nwaifu-ui/src/lib/components/button/button.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'nwui-button',
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.scss'],
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ButtonComponent {
|
||||
@Input() disabled = false;
|
||||
@Input() type: string | undefined;
|
||||
}
|
||||
1
nwaifu-ui/src/lib/components/button/index.ts
Normal file
1
nwaifu-ui/src/lib/components/button/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './button.component';
|
||||
Reference in New Issue
Block a user