|
| 1 | +import {Component} from '@angular/core'; |
| 2 | + |
| 3 | +export interface Dog { |
| 4 | + name: string; |
| 5 | + human: string; |
| 6 | +} |
| 7 | + |
| 8 | +@Component({ |
| 9 | + moduleId: module.id, |
| 10 | + selector: 'grid-list-a11y', |
| 11 | + templateUrl: 'grid-list-a11y.html', |
| 12 | + styleUrls: ['grid-list-a11y.css'], |
| 13 | +}) |
| 14 | +export class GridListAccessibilityDemo { |
| 15 | + dogs: Dog[] = [ |
| 16 | + { name: 'Porter', human: 'Kara' }, |
| 17 | + { name: 'Mal', human: 'Jeremy' }, |
| 18 | + { name: 'Koby', human: 'Igor' }, |
| 19 | + { name: 'Razzle', human: 'Ward' }, |
| 20 | + { name: 'Molly', human: 'Rob' }, |
| 21 | + { name: 'Husi', human: 'Matias' }, |
| 22 | + ]; |
| 23 | + |
| 24 | + tiles = [ |
| 25 | + {text: 'Cappuccino', cols: 3, rows: 1, color: 'lightblue'}, |
| 26 | + {text: 'Mocha', cols: 1, rows: 2, color: 'lightgreen'}, |
| 27 | + {text: 'Latte', cols: 1, rows: 1, color: 'lightpink'}, |
| 28 | + {text: 'Iced coffee', cols: 2, rows: 1, color: '#DDBDF1'}, |
| 29 | + ]; |
| 30 | + |
| 31 | + fixedCols = 4; |
| 32 | + fixedRowHeight = 100; |
| 33 | + ratioGutter = 1; |
| 34 | + fitListHeight = '400px'; |
| 35 | + ratio = '4:1'; |
| 36 | +} |
0 commit comments