chatgtp showed it a slider property and background color then asked to write the code display what is on screen not exactly what I wanted but seemed to understand properties
Oh interesting… so you showed it the properties JSON code? and asked it to generate the HTML for the Template?
That’s how I did it to make my Google Sheet component. Just asked chatGTP how I could import from Google Sheets into a custom component in Elements and told that a CC has a template, Styles, Javascript, Hooks and Properties section. ChatGTP seems to understand how it works. It created the Json code and the HTML code for the Template. Just had to give the link to the manual so it understood it had to use groups for the properties.
yes showed it once and it wrote the rest, I told it that they couldn’t be the same. as they were variables, it the created the rest, I also showed it the colour version, told it to put one square in another and use relative and absolute, I could have written self but just wanted to see if it could work it out not exposed any more json,
I wrote it and messed the code up a bit but chat pointed it out I messed up the px format
Duplicate Titles: Changed the second “Height” title to “Width” to avoid duplication.
-
JSON Format: Fixed issues with quotation marks to ensure valid JSON.
-
Units: Changed “p”x to “px” for consistency in units.
-
Array Structure: Wrapped the objects in an array to allow for multiple properties.