-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SeparationLineComponent for visual separation in charts
This commit introduces the SeparationLineComponent, which provides a styled separation line for visual clarity between chart sections. The component includes its own CSS for styling, an HTML template, and a basic spec file for testing. The component is utilized in the label-chart component to visually distinguish comparison charts.
- Loading branch information
Showing
6 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/app/item-detail/separation-line/separation-line.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
.separation-line { | ||
overflow: hidden; | ||
text-align: center; | ||
margin-top: 1.5rem; | ||
margin-bottom: 0.8rem; | ||
} | ||
|
||
.separation-line::before, | ||
.separation-line::after { | ||
content: ""; | ||
display: inline-block; | ||
height: 2px; | ||
position: relative; | ||
vertical-align: middle; | ||
width: 50%; | ||
border: none; | ||
border-top: 1px dotted #a1b3df; | ||
} | ||
|
||
.separation-line::before { | ||
right: 0.5em; | ||
margin-left: -50%; | ||
} | ||
|
||
.separation-line::after { | ||
left: 0.5em; | ||
margin-right: -50%; | ||
} |
1 change: 1 addition & 0 deletions
1
src/app/item-detail/separation-line/separation-line.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h6 class="separation-line">Comparing Chart</h6> |
23 changes: 23 additions & 0 deletions
23
src/app/item-detail/separation-line/separation-line.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import { SeparationLineComponent } from "./separation-line.component"; | ||
|
||
describe("SeparationLineComponent", () => { | ||
let component: SeparationLineComponent; | ||
let fixture: ComponentFixture<SeparationLineComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [SeparationLineComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(SeparationLineComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
src/app/item-detail/separation-line/separation-line.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: 'app-separation-line', | ||
templateUrl: './separation-line.component.html', | ||
styleUrls: ['./separation-line.component.css'] | ||
}) | ||
export class SeparationLineComponent { | ||
|
||
} |