-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(Button): Inizia la realizzazione della documentazione dedicata a…
…lla componente per i bottoni ref #44
- Loading branch information
Mario Traetta
committed
Jul 26, 2018
1 parent
4c50edc
commit 9de22c0
Showing
25 changed files
with
495 additions
and
3 deletions.
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
33 changes: 33 additions & 0 deletions
33
src/app/button/button-example-color/button-example-color.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,33 @@ | ||
<div class="card w-50 mt-2"> | ||
<div class="card-body"> | ||
|
||
<h4 class="card-title">Varianti di colore con sfondo chiaro</h4> | ||
<div class="py-1"> | ||
<p class="card-text" class="example-section"> | ||
<it-button [color]="primaryColor">Primary</it-button> | ||
<it-button [color]="primaryColor" [outline]="isOutlined">Primary outline</it-button> | ||
<it-button [color]="primaryColor" [disabled]="isDisabled">Primary disabled</it-button> | ||
</p> | ||
<p class="card-text" class="example-section"> | ||
<it-button [color]="secondaryColor">Secondary</it-button> | ||
<it-button [color]="secondaryColor" [outline]="isOutlined">Secondary outline</it-button> | ||
<it-button [color]="secondaryColor" [disabled]="isDisabled">Secondary disabled</it-button> | ||
</p> | ||
</div> | ||
|
||
<h4 class="card-title">Varianti di colore con sfondo scuro</h4> | ||
<div class="bg-dark py-1"> | ||
<p class="card-text" class="example-section"> | ||
<it-button [color]="primaryColor">Primary</it-button> | ||
<it-button [color]="primaryColor" [outline]="isOutlined">Primary outline</it-button> | ||
<it-button [color]="primaryColor" [disabled]="isDisabled">Primary disabled</it-button> | ||
</p> | ||
<p class="card-text" class="example-section"> | ||
<it-button [color]="secondaryColor">Secondary</it-button> | ||
<it-button [color]="secondaryColor" [outline]="isOutlined">Secondary outline</it-button> | ||
<it-button [color]="secondaryColor" [disabled]="isDisabled">Secondary disabled</it-button> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
src/app/button/button-example-color/button-example-color.component.scss
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,4 @@ | ||
it-button { | ||
margin: 4px 8px; | ||
width: 200px; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/button/button-example-color/button-example-color.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ButtonExampleColorComponent } from './button-example-color.component'; | ||
|
||
describe('ButtonExampleColorComponent', () => { | ||
let component: ButtonExampleColorComponent; | ||
let fixture: ComponentFixture<ButtonExampleColorComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ButtonExampleColorComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ButtonExampleColorComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
src/app/button/button-example-color/button-example-color.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,20 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'it-button-example-color', | ||
templateUrl: './button-example-color.component.html', | ||
styleUrls: ['./button-example-color.component.scss'] | ||
}) | ||
export class ButtonExampleColorComponent implements OnInit { | ||
|
||
primaryColor = 'primary'; | ||
secondaryColor = 'secondary'; | ||
isDisabled = true; | ||
isOutlined = true; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/app/button/button-example-size/button-example-size.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,35 @@ | ||
<div class="card w-50 mt-2"> | ||
<div class="card-body"> | ||
<h4 class="card-title">Varianti di dimensione</h4> | ||
|
||
<p class="card-text" class="example-section"> | ||
<it-button [size]="xsSize" [color]="primaryColor"> | ||
Button XS | ||
</it-button> | ||
|
||
<it-button [size]="xsSize" [color]="secondaryColor"> | ||
Button XS | ||
</it-button> | ||
</p> | ||
|
||
<p class="card-text" class="example-section"> | ||
<it-button [size]="smSize" [color]="primaryColor"> | ||
Button SM | ||
</it-button> | ||
|
||
<it-button [size]="smSize" [color]="secondaryColor"> | ||
Button SM | ||
</it-button> | ||
</p> | ||
|
||
<p class="card-text" class="example-section"> | ||
<it-button [size]="lgSize" [color]="primaryColor"> | ||
Button LG | ||
</it-button> | ||
|
||
<it-button [size]="lgSize" [color]="secondaryColor"> | ||
Button LG | ||
</it-button> | ||
</p> | ||
</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
src/app/button/button-example-size/button-example-size.component.scss
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,4 @@ | ||
it-button { | ||
margin: 4px 8px; | ||
width: 200px; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/button/button-example-size/button-example-size.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ButtonExampleSizeComponent } from './button-example-size.component'; | ||
|
||
describe('ButtonExampleSizeComponent', () => { | ||
let component: ButtonExampleSizeComponent; | ||
let fixture: ComponentFixture<ButtonExampleSizeComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ButtonExampleSizeComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ButtonExampleSizeComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
src/app/button/button-example-size/button-example-size.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,22 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'it-button-example-size', | ||
templateUrl: './button-example-size.component.html', | ||
styleUrls: ['./button-example-size.component.scss'] | ||
}) | ||
export class ButtonExampleSizeComponent implements OnInit { | ||
|
||
primaryColor = 'primary'; | ||
secondaryColor = 'secondary'; | ||
|
||
lgSize = 'lg'; | ||
smSize = 'sm'; | ||
xsSize = 'xs'; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/app/button/button-example/button-example.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,23 @@ | ||
<div class="card w-50 mt-2"> | ||
<div class="card-body"> | ||
<h4 class="card-title">Configurazione bottone</h4> | ||
|
||
<p class="card-text" class="example-section"> | ||
<it-button> | ||
Abilitato | ||
</it-button> | ||
</p> | ||
|
||
<p class="card-text" class="example-section"> | ||
<it-button disabled> | ||
Disabilitato | ||
</it-button> | ||
</p> | ||
|
||
<p class="card-text" class="example-section"> | ||
<it-button block> | ||
A blocco | ||
</it-button> | ||
</p> | ||
</div> | ||
</div> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/app/button/button-example/button-example.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ButtonExampleComponent } from './button-example.component'; | ||
|
||
describe('ButtonExampleComponent', () => { | ||
let component: ButtonExampleComponent; | ||
let fixture: ComponentFixture<ButtonExampleComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ButtonExampleComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ButtonExampleComponent); | ||
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,20 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'it-button-example', | ||
templateUrl: './button-example.component.html', | ||
styleUrls: ['./button-example.component.scss'] | ||
}) | ||
export class ButtonExampleComponent implements OnInit { | ||
color = 'primary'; | ||
disabled = false; | ||
isOutlined = false; | ||
size = 'lg'; | ||
isBlock = false; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
src/app/button/button-examples/button-examples.component.scss
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,4 @@ | ||
it-button { | ||
margin: 4px 8px; | ||
width: 200px; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/app/button/button-examples/button-examples.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ButtonExamplesComponent } from './button-examples.component'; | ||
|
||
describe('ButtonExamplesComponent', () => { | ||
let component: ButtonExamplesComponent; | ||
let fixture: ComponentFixture<ButtonExamplesComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ButtonExamplesComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ButtonExamplesComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.