| 1 |
import Property from "./Property"; |
| 2 |
|
| 3 |
class ColorProperty extends Property { |
| 4 |
generate() { |
| 5 |
if( this.attributes?.[this.id] != undefined ) { |
| 6 |
this.data = { desktop: this.args.hasOwnProperty('customProperty') ? `${this.args.customProperty}:${this.attributes[this.id]}` : `color: ${this.attributes[this.id]};` }; |
| 7 |
} |
| 8 |
if (this.args?.hover && this.attributes?.[this.args?.hover] != undefined ) { |
| 9 |
this.data.hoverDesktop = `color: ${this.attributes[this.args?.hover]};`; |
| 10 |
} |
| 11 |
} |
| 12 |
} |
| 13 |
|
| 14 |
export default ColorProperty; |
| 15 |
|