import nanohtml from 'nanohtml'; import { Img, Picture, Source } from '../tree'; const makeImg = (obj: Img) => { return nanohtml``; }; const makeSource = (obj: Source) => { return nanohtml``; }; export const makePicture = (obj: Picture) => { const img = makeImg(obj.img); if (obj.sources) { return nanohtml`${obj.sources.map((s: Source) => makeSource(s))} ${img}`; } return nanohtml`${img}`; };