* use Preact ColorPicker in creator onboarding * update tests * update comments * Update app/javascript/packs/admin/creatorOnboarding.jsx Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
9 lines
400 B
JavaScript
9 lines
400 B
JavaScript
import { replaceTextInputWithColorPicker } from '../colorPickers/replaceTextInputWithColorPicker';
|
|
|
|
// Find any color picker inputs on the page and replace them with the Preact enhanced component
|
|
const colorInputs = document.querySelectorAll('[data-color-picker]');
|
|
|
|
for (const input of colorInputs) {
|
|
const { labelText } = input.dataset;
|
|
replaceTextInputWithColorPicker({ input, labelText });
|
|
}
|