Sha256: a9b2f9e66d89edbb649f75fdf996c234717c49127f10d6b878012e49496f974e
Contents?: true
Size: 508 Bytes
Versions: 40
Compression:
Stored size: 508 Bytes
Contents
import { CocoComponent } from "@js/coco"; import { getData } from "@helpers/alpine"; export default CocoComponent("appColorPickerButton", ({ selected }) => { selected = selected ? "#" + selected.replace("#", "") : "#FFFFFF"; return { selectedColor: selected, getPicker() { return getData( this.$root.querySelector("[data-role='color-picker']").firstElementChild ); }, onDropdownMount() { this.getPicker().setSelectedColor(this.selectedColor); }, }; });
Version data entries
40 entries across 40 versions & 1 rubygems