Skip to content

Commit 434cf99

Browse files
authored
refactor: dialog to tailwind
* fix: divider color fix * refactor: dialog to tailwind
1 parent e66dc54 commit 434cf99

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +0,0 @@
1-
.dialog {
2-
background: var(--color-background);
3-
border-radius: var(--border-radius);
4-
border: var(--border);
5-
box-shadow: var(--color-shadow);
6-
}
7-
8-
.dialog-header {
9-
padding: 10px;
10-
display: flex;
11-
button {
12-
margin-left: auto;
13-
}
14-
}

projects/ngverse/src/lib/dialog/dialog/dialog.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<div @dialogEnter class="dialog">
2-
<div class="dialog-header">
1+
<div @dialogEnter class="rounded-md bg-background shadow-md">
2+
<div class="flex p-3">
33
@if (title) {
44
<p>{{ title }}</p>
55
}
66
@if (showClose) {
7-
<button appDialogClose>
7+
<button appDialogClose aria-label="Close the dialog" class="ml-auto">
88
<app-dialog-close-icon></app-dialog-close-icon>
99
</button>
1010
}

projects/ngverse/src/lib/dialog/dialog/dialog.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ describe('DialogComponent', () => {
6363
});
6464

6565
it('should display title', () => {
66-
expect(
67-
fixture.nativeElement.querySelector('.dialog-header p').textContent.trim()
68-
).toBe('Dialog');
66+
expect(fixture.nativeElement.querySelector('p').textContent.trim()).toBe(
67+
'Dialog'
68+
);
6969
});
7070

7171
it('should display component', () => {

projects/ngverse/src/lib/divider/divider.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
88
styles: `
99
:host {
1010
display: block;
11-
background-color: var(--nv-divider);
11+
background-color: var(--color-divider);
1212
height: 1px;
1313
width: 100%;
1414

0 commit comments

Comments
 (0)