Sha256: 48f9e128a14f8e3a45f2009a8ed122f955f4245d7e6e652812aee273a38924fa
Contents?: true
Size: 522 Bytes
Versions: 7
Compression:
Stored size: 522 Bytes
Contents
import { CocoComponent } from "@assets/js/shared/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
7 entries across 7 versions & 1 rubygems