import { Prop, toNative } from 'vue-facing-decorator'; import TsxComponent, { Component } from '../../app/vuetsx'; import './css/tilebox-alt.css'; export enum TileboxColor { Purple = 'tlb-purple', Black = 'tlb-black', Yellow = 'tlb-yellow', Red = 'tlb-red', Blue = 'tlb-blue', Rusty = 'tlb-rusty', Green = 'tlb-green', DarkPurple = 'tlb-darkpurple', } interface TileboxArgs { icon: string; title: string; subtitle: string; url?: string; gridClass: string; color: TileboxColor; isRouterLink?: boolean; clicked?: () => void; } @Component class TileboxComponent extends TsxComponent implements TileboxArgs { @Prop() icon!: string; @Prop() title!: string; @Prop() subtitle!: string; @Prop() url!: string; @Prop() gridClass!: string; @Prop() color!: TileboxColor; @Prop() isRouterLink!: boolean; @Prop() clicked: () => void; render(h) { if (this.clicked != null) { return ( {this.renderInner(h)} ); } else if (this.isRouterLink) { return ( {this.renderInner(h)} ); } else { return ( {this.renderInner(h)} ); } } renderInner(h) { return (

{this.title}
{this.subtitle}
); } } const Tilebox = toNative(TileboxComponent); export default Tilebox;