import { Component, Input, HostBinding } from '@angular/core';
/**
*
* Reveal card example:
* @stacked-example(My example, reveal-card/reveal-card-showcase.component)
*
* As a content Reveal card accepts two instances of `nb-card` - for front and back sides.
*
* Basic reveal card configuration:
*
* ```html
*
*
*
*
* Front
*
*
*
*
*
*
* Back
*
*
*
*
* ```
*
* ### Installation
*
* Import `NbCardModule` to your feature module.
* ```ts
* @NgModule({
* imports: [
* // ...
* NbCardModule,
* ],
* })
* export class PageModule { }
* ```
* ### Usage
*
* Reveal Card with header and footer:
* @stacked-example(With Header & Footer, reveal-card/reveal-card-full.component)
*
* Colored reveal-cards could be simply configured by providing a `status` property:
* @stacked-example(Colored Card, reveal-card/reveal-card-colors.component)
*
* It is also possible to assign an `accent` property for a slight card highlight
* as well as combine it with `status`:
* @stacked-example(Accent Card, reveal-card/reveal-card-accents.component)
*
* @additional-example(Multiple Sizes, reveal-card/reveal-card-sizes.component)
*/
@Component({
selector: 'nb-reveal-card',
styleUrls: ['./reveal-card.component.scss'],
template: `
`,
})
export class NbRevealCardComponent {
/**
* Reveal state
* @type boolean
*/
@Input()
@HostBinding('class.revealed')
revealed: boolean = false;
/**
* Show/hide toggle button to be able to control toggle from your code
* @type {boolean}
*/
@Input() showToggleButton = true;
toggle() {
this.revealed = !this.revealed;
}
}