web-illinois / toolkit-builder-3

New Toolkit Builder
0 stars 1 forks source link

Images and cards for components #7

Open bryanjonker-illinois opened 2 months ago

marvel-uiuc commented 2 months ago

Just as a note for implementation, I believe this should be pretty easy with Playwright. I'm envisioning having a source in the builder JSON in each component, and CSS if needed. A script can build a page using those, then load it to Playwright, and run something like:

const element = await page.locator(`#${component}`);
await element.screenshot({ path: `${component}.png` });