Skip to content

Commit 3bbc050

Browse files
committed
export all components on module
1 parent 3708ed8 commit 3bbc050

18 files changed

+104
-107
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { ErrorComponent } from './error.component';
5+
import { SuccessComponent } from './success.component';
6+
7+
const COMPONENTS = [ErrorComponent, SuccessComponent];
8+
9+
@NgModule({
10+
declarations: COMPONENTS,
11+
imports: [CommonModule],
12+
exports: COMPONENTS,
13+
})
14+
export class AlertModule {}

src/app/shared/components/alert/error.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ import { Component, Input } from '@angular/core';
3434
})
3535
export class ErrorComponent {
3636
@Input() class!: string;
37-
3837
@Input() message!: string;
39-
4038
@Input() errors: string[] = [];
4139
}

src/app/shared/components/alert/success.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ import { Component, Input } from '@angular/core';
2727
})
2828
export class SuccessComponent {
2929
@Input() class!: string;
30-
3130
@Input() message!: string;
3231
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { ButtonPrimaryComponent } from './primary.component';
5+
import { ButtonLinkComponent } from './link.component';
6+
import { ButtonDefaultComponent } from './default.component';
7+
import { RouterModule } from '@angular/router';
8+
9+
const COMPONENTS = [
10+
ButtonPrimaryComponent,
11+
ButtonLinkComponent,
12+
ButtonDefaultComponent,
13+
];
14+
15+
@NgModule({
16+
declarations: COMPONENTS,
17+
imports: [CommonModule, RouterModule],
18+
exports: COMPONENTS,
19+
})
20+
export class ButtonModule {}

src/app/shared/components/buttons/default.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ import { Observable } from 'rxjs';
3333
})
3434
export class ButtonDefaultComponent {
3535
@Input() type: string = 'button';
36-
3736
@Input() loading$!: Observable<boolean>;
38-
3937
@Input() class!: string;
4038
}

src/app/shared/components/buttons/link.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import { Component, Input } from '@angular/core';
66
<a
77
[routerLink]="link"
88
[ngClass]="class"
9-
class="inline-flex items-center rounded-md border border-transparent bg-primary-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:bg-gray-700 dark:hover:bg-gray-800 dark:text-slate-300 dark:hover:text-white dark:focus:ring-offset-gray-800">
9+
class="inline-flex items-center rounded-md border border-transparent bg-primary-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2">
1010
<ng-content></ng-content>
1111
</a>
1212
`,
1313
})
1414
export class ButtonLinkComponent {
1515
@Input() link!: any;
16-
1716
@Input() class!: string;
1817
}

src/app/shared/components/buttons/primary.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ import { Observable } from 'rxjs';
3535
})
3636
export class ButtonPrimaryComponent {
3737
@Input() type: string = 'button';
38-
3938
@Input() loading$!: Observable<boolean>;
40-
4139
@Input() class!: string;
4240
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { PageHeadingWithActionComponent } from './page-heading-with-action.component';
5+
import { PageHeadingComponent } from './page-heading.component';
6+
7+
const COMPONENTS = [PageHeadingWithActionComponent, PageHeadingComponent];
8+
9+
@NgModule({
10+
declarations: COMPONENTS,
11+
imports: [CommonModule],
12+
exports: COMPONENTS,
13+
})
14+
export class HeadingModule {}

src/app/shared/components/headings/page-heading.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ import { Component, Input } from '@angular/core';
2222
})
2323
export class PageHeadingComponent {
2424
@Input() title!: string;
25-
2625
@Input() description!: string;
2726
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4+
5+
import { OverlapingLabelComponent } from './overlaping-label/overlaping-label.component';
6+
7+
const COMPONENTS = [OverlapingLabelComponent];
8+
9+
@NgModule({
10+
declarations: COMPONENTS,
11+
imports: [CommonModule, FormsModule, ReactiveFormsModule],
12+
exports: COMPONENTS,
13+
})
14+
export class InputsModule {}

0 commit comments

Comments
 (0)