UNPKG

@pilotlab/lux-tools

Version:

A luxurious user experience framework, developed by your friends at Pilot.

24 lines (17 loc) 674 B
import { DataType, Attribute, Attributes, AttributeChangeOptions, Color } from '@pilotlab/attributes'; export class StyleElement extends Attribute<Attributes> { constructor(data?:(StyleElement | Attributes | Object | string)) { super('styleElement', data, DataType.COLLECTION); this.p_color = <Color>this.children.get('color', new Color(), DataType.COLOR, null, AttributeChangeOptions.zero); } get color():Color { return this.p_color.value; } set color(value:Color) { this.p_color.value.set(value, AttributeChangeOptions.save.durationZero); } protected p_color:Color; } // End Class export default StyleElement;