aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/html/Template.kt
blob: f54c6115e4b0f05b562777764aeb61a8e4ed20ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (c) 2018. Robert Jaros
 */
package pl.treksoft.kvision.html

interface Template {
    var content: String?
    var rich: Boolean
    var template: (Any?) -> String

    var templateData: Any?
        get() {
            return null
        }
        set(value) {
            if (!rich) rich = true
            content = template(value)
        }
}