-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Pourchel
committed
Feb 23, 2024
1 parent
e864979
commit d0530a7
Showing
10 changed files
with
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.steps { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
text-align: center; | ||
} | ||
|
||
.steps div{ | ||
padding: 0.5rem; | ||
} | ||
|
||
.steps div p{ | ||
padding: 0.5rem; | ||
} | ||
|
||
.steps div p a { | ||
padding: 0.6rem 1rem; | ||
border-radius: 100%; | ||
background-color: var(--main-color); | ||
color: var(--text-inv); | ||
} | ||
|
||
@media (min-width: 550px) { | ||
.steps { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-around; | ||
} | ||
} |
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,34 @@ | ||
<div class="steps"> | ||
<div class="firstStep"> | ||
<p> | ||
<a href="#">1</a> | ||
</p> | ||
<p> | ||
<span>{{ titles[0] }}</span> | ||
</p> | ||
</div> | ||
<div class="secondStep"> | ||
<p> | ||
<a href="#">2</a> | ||
</p> | ||
<p> | ||
<span>{{ titles[1] }}</span> | ||
</p> | ||
</div> | ||
<div class="thirdStep"> | ||
<p> | ||
<a href="#">3</a> | ||
</p> | ||
<p> | ||
<span>{{ titles[2] }}</span> | ||
</p> | ||
</div> | ||
<div class="fourthStep"> | ||
<p> | ||
<a href="#">4</a> | ||
</p> | ||
<p> | ||
<span>{{ titles[3] }}</span> | ||
</p> | ||
</div> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
projects/ngx-cream-lib/src/lib/steps/steps.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 { StepsComponent } from './steps.component'; | ||
|
||
describe('StepsComponent', () => { | ||
let component: StepsComponent; | ||
let fixture: ComponentFixture<StepsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ StepsComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(StepsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'c3m-steps', | ||
templateUrl: './steps.component.html', | ||
styleUrls: ['./steps.component.css'], | ||
}) | ||
export class StepsComponent { | ||
@Input() titles: Array<string> = []; | ||
} |
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
Empty file.
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,42 @@ | ||
<section id="steps"> | ||
<h3>General component</h3> | ||
|
||
<c3m-tabs class="block-style" label="Demo and Code"> | ||
<c3m-tab-panel class="block-style" tabTitle="Demo" [isActive]="true"> | ||
<c3m-steps [titles]="titles"></c3m-steps> | ||
</c3m-tab-panel> | ||
<c3m-tab-panel class="block-style" tabTitle="Application"> | ||
<pre></pre> | ||
</c3m-tab-panel> | ||
</c3m-tabs> | ||
</section> | ||
|
||
<section id="props-n-events"> | ||
<h3>Properties and Events</h3> | ||
|
||
<table class="adaptable"> | ||
<caption> | ||
Properties applicable to the component | ||
<code>c3m-steps</code> | ||
</caption> | ||
<tr> | ||
<th scope="col">Name</th> | ||
<th scope="col">Type</th> | ||
<th scope="col">Default</th> | ||
<th scope="col">Description</th> | ||
</tr> | ||
<tr> | ||
<td data-head="Name"></td> | ||
<td data-head="Type"></td> | ||
<td data-head="Default"></td> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<td data-head="Name"></td> | ||
<td data-head="Type"></td> | ||
<td data-head="Default"></td> | ||
<td></td> | ||
</tr> | ||
</table> | ||
<p><em>* mandatory properties</em></p> | ||
</section> |
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,15 @@ | ||
import { Component } from '@angular/core'; | ||
import { CreamPage } from '../cream-page'; | ||
|
||
@Component({ | ||
selector: 'app-steps-page', | ||
templateUrl: './steps-page.component.html', | ||
styleUrls: ['./steps-page.component.css'], | ||
}) | ||
export class StepsPageComponent implements CreamPage { | ||
pageTitle = 'Steps'; | ||
componentName = 'c3m-steps'; | ||
resourceType = 'Component'; | ||
|
||
titles = ['Personal', 'Seat', 'Payment', 'Confirmation']; | ||
} |