focalboard/webapp/src/blocks/card.ts

19 lines
509 B
TypeScript
Raw Normal View History

2020-10-15 02:35:15 +02:00
import { Block } from "./block"
class Card extends Block {
get icon(): string { return this.fields.icon as string }
set icon(value: string) { this.fields.icon = value }
get properties(): Record<string, string> { return this.fields.properties as Record<string, string> }
set properties(value: Record<string, string>) { this.fields.properties = value }
constructor(block: any = {}) {
super(block)
this.type = "card"
this.properties = { ...(block.fields?.properties || {}) }
}
}
export { Card }