ipsos-components
Version:
Material Design components for Angular
44 lines (37 loc) • 1.14 kB
text/typescript
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component} from '@angular/core';
({
moduleId: module.id,
selector: 'grid-list-demo',
templateUrl: 'grid-list-demo.html',
styleUrls: ['grid-list-demo.css']
})
export class GridListDemo {
tiles: any[] = [
{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'},
];
dogs: Object[] = [
{ name: 'Porter', human: 'Kara' },
{ name: 'Mal', human: 'Jeremy' },
{ name: 'Koby', human: 'Igor' },
{ name: 'Razzle', human: 'Ward' },
{ name: 'Molly', human: 'Rob' },
{ name: 'Husi', human: 'Matias' },
];
basicRowHeight = 80;
fixedCols = 4;
fixedRowHeight = 100;
ratioGutter = 1;
fitListHeight = '400px';
ratio = '4:1';
addTileCols() { this.tiles[2].cols++; }
}