src/tiles/tile.component.ts
Build application's tiles using this component. Get started with importing the module:
Example :import { TilesModule } from 'carbon-components-angular';
<cds-tile>
tile content
</cds-tile>
selector | cds-tile, ibm-tile |
template |
|
Properties |
Inputs |
HostBindings |
Accessors |
theme | |
Type : "light" | "dark"
|
|
Default value : "dark"
|
|
Defined in src/tiles/tile.component.ts:37
|
class.cds--tile |
Type : boolean
|
Default value : true
|
Defined in src/tiles/tile.component.ts:27
|
class.cds--tile--light |
Type : boolean
|
Defined in src/tiles/tile.component.ts:29
|
tileClass |
Default value : true
|
Decorators :
@HostBinding('class.cds--tile')
|
Defined in src/tiles/tile.component.ts:27
|
lightThemeEnabled |
getlightThemeEnabled()
|
Defined in src/tiles/tile.component.ts:29
|
import {
Component,
HostBinding,
Input
} from "@angular/core";
/**
* Build application's tiles using this component. Get started with importing the module:
*
* ```typescript
* import { TilesModule } from 'carbon-components-angular';
* ```
*
* ```html
* <cds-tile>
* tile content
* </cds-tile>
* ```
*
* [See demo](../../?path=/story/components-tiles--basic)
*/
@Component({
selector: "cds-tile, ibm-tile",
template: `<ng-content></ng-content>`
})
export class Tile {
@HostBinding("class.cds--tile") tileClass = true;
@HostBinding("class.cds--tile--light") get lightThemeEnabled() {
return this.theme === "light";
}
/**
* @deprecated since v5 - Use `cdsLayer` directive instead
* Set to `"light"` to apply the light style
*/
@Input() theme: "light" | "dark" = "dark";
}