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

Function Edit

interactivity-block-tailwind/src/edit.js:24–55  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

22 * @return {Element} Element to render.
23 */
24export default function Edit(props) {
25 function updateSkyColor(e) {
26 props.setAttributes({ skyColor: e.target.value })
27 }
28
29 function updateGrassColor(e) {
30 props.setAttributes({ grassColor: e.target.value })
31 }
32
33 return (
34 <div {...useBlockProps()}>
35 <div className="my-unique-plugin-wrapper-class">
36 <div className="bg-blue-200 border-2 border-blue-300 rounded-md p-5">
37 <input
38 className="mr-3 p-2 rounded-lg"
39 type="text"
40 value={props.attributes.skyColor}
41 onChange={updateSkyColor}
42 placeholder="sky color..."
43 />
44 <input
45 className="p-2 rounded-lg"
46 type="text"
47 value={props.attributes.grassColor}
48 onChange={updateGrassColor}
49 placeholder="grass color..."
50 />
51 </div>
52 </div>
53 </div>
54 )
55}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected