snaha / diete.design

https://diete.design
MIT License
0 stars 0 forks source link

On component pages we should render the `useCode` in the Preview section #160

Open vojtechsimetka opened 5 months ago

vojtechsimetka commented 5 months ago

Right now we create the usage code as a derived state (e.g. here) and then pretty much duplicate this logic in the preview section (e.g. here.

It would be good to write the code once and then just render it. We should try and render the useCode directly with {@html useCode}. Mind you, right now this does not handle snippets - we should try to use latest svelte version and if the problem persists report.