forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose version object in releases (angular#4962)
* In releases there will be a constant called `VERSION` that holds the current version of the installed package (material or cdk) * This is similar as for every @angular package like core, forms, compiler. Add accessibility demo page for grid list .
- Loading branch information
1 parent
d29fb66
commit 2c4ee15
Showing
6 changed files
with
82 additions
and
0 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
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> | ||
<h2>Fixed-height grid list</h2> | ||
<md-grid-list [cols]="fixedCols" [rowHeight]="fixedRowHeight"> | ||
<md-grid-tile *ngFor="let tile of tiles" [colspan]="tile.cols" [rowspan]="tile.rows" | ||
[style.background]="tile.color"> | ||
{{tile.text}} | ||
</md-grid-tile> | ||
</md-grid-list> | ||
</section> | ||
|
||
<section> | ||
<h2>Ratio-height grid list</h2> | ||
<md-grid-list cols="2" [rowHeight]="ratio" gutterSize="4px"> | ||
<md-grid-tile *ngFor="let tile of tiles" [style.background]="'lightblue'"> | ||
{{tile.text}} | ||
</md-grid-tile> | ||
</md-grid-list> | ||
</section> | ||
|
||
<section> | ||
<h2>Fit-height grid list</h2> | ||
<md-grid-list cols="2" rowHeight="fit" [gutterSize]="ratioGutter" | ||
[style.height]="fitListHeight"> | ||
<md-grid-tile *ngFor="let tile of tiles" [style.background]="'#F1EBBA'"> | ||
{{tile.text}} | ||
</md-grid-tile> | ||
</md-grid-list> | ||
</section> | ||
|
||
<section> | ||
<h2>Grid list with header and footer</h2> | ||
<md-grid-list cols="3" rowHeight="200px"> | ||
<md-grid-tile *ngFor="let dog of dogs"> | ||
<md-grid-tile-header>{{dog.name}}</md-grid-tile-header> | ||
<img [alt]="dog.name" src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png"> | ||
<md-grid-tile-footer> | ||
<span md-line>Human: {{dog.human}}</span> | ||
<md-icon>star_border</md-icon> | ||
</md-grid-tile-footer> | ||
</md-grid-tile> | ||
</md-grid-list> | ||
</section> |
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,35 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
interface Dog { | ||
name: string; | ||
human: string; | ||
} | ||
@Component({ | ||
moduleId: module.id, | ||
selector: 'grid-list-a11y', | ||
templateUrl: 'grid-list-a11y.html', | ||
styleUrls: ['grid-list-a11y.css'], | ||
}) | ||
export class GridListAccessibilityDemo { | ||
dogs: Dog[] = [ | ||
{ name: 'Porter', human: 'Kara' }, | ||
{ name: 'Mal', human: 'Jeremy' }, | ||
{ name: 'Koby', human: 'Igor' }, | ||
{ name: 'Razzle', human: 'Ward' }, | ||
{ name: 'Molly', human: 'Rob' }, | ||
{ name: 'Husi', human: 'Matias' }, | ||
]; | ||
|
||
tiles = [ | ||
{text: 'One', cols: 3, rows: 1, color: 'lightblue'}, | ||
{text: 'Two', cols: 1, rows: 2, color: 'lightgreen'}, | ||
{text: 'Three', cols: 1, rows: 1, color: 'lightpink'}, | ||
{text: 'Four', cols: 2, rows: 1, color: '#DDBDF1'}, | ||
]; | ||
|
||
fixedCols = 4; | ||
fixedRowHeight = 100; | ||
ratioGutter = 1; | ||
fitListHeight = '400px'; | ||
ratio = '4:1'; | ||
} |
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