class {
    onInput(input) {
        this.state = {
            size: input.size || 'normal',
            variant: input.variant || 'primary',
            body: input.renderBody
        };
    }

    // Add any other methods here
    setVariant(variant) {
        this.state.variant = variant;
    }

    setSize(size) {
        this.state.size = size;
    }

    setLabel(label) {
        this.state.label = label;
    }
}

$ var variantClassName=(state.variant !== 'primary' && 'app-button-' + state.variant)
$ var sizeClassName=(state.size !== 'normal' && 'app-button-' + state.size)

<button class=['app-button', variantClassName, sizeClassName]>
    <span>
        <include(state.body)/>
    </span>
</button>