MCPcopy Create free account
hub / github.com/LearnWebCode/brads-boilerplate-wordpress / Edit

Function Edit

interactivity-block/src/edit.js:32–57  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

30 * @return {Element} Element to render.
31 */
32export default function Edit(props) {
33 function updateSkyColor(e) {
34 props.setAttributes({ skyColor: e.target.value });
35 }
36
37 function updateGrassColor(e) {
38 props.setAttributes({ grassColor: e.target.value });
39 }
40
41 return (
42 <div {...useBlockProps()}>
43 <input
44 type="text"
45 value={props.attributes.skyColor}
46 onChange={updateSkyColor}
47 placeholder="sky color..."
48 />
49 <input
50 type="text"
51 value={props.attributes.grassColor}
52 onChange={updateGrassColor}
53 placeholder="grass color..."
54 />
55 </div>
56 );
57}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected