jamespatrickgibson / union

A design system boilerplate for Svelte & CSS
http://www.designwithunion.com
2 stars 2 forks source link

Example #44

Open peterbsmyth opened 4 years ago

peterbsmyth commented 4 years ago

Getting started

I compiled snippets of source from three places:

the lightly annotated code is here.

Notes

...the angular example-viewer is a tightly-coupled system. Angular docs use a pre-processor, i haven't located that source code, that uses a method similar to svelte-docs for processing markdown.
...the example-viewer can only show examples from a source that is in an angular namespace @angular/component-examples that makes it possible to define an example to display based on a predefined string key. the inline usage in a markdown file looks like:

<!-- example(cdk-drag-drop-overview) -->

...the svelte markdown preprocessor that is a part of the svelte-docs project is a small amount of code.

...the react project couples the style. it is the only project whose props allow for style to be passed in using a className prop. as well, it shares with the angular example-viewer an expandable/collapsible prop.

jamespatrickgibson commented 4 years ago

I think I'm going to open up a new branch in the project specifically to explore this component a bit

jamespatrickgibson commented 4 years ago

https://github.com/jamespatrickgibson/union/pull/45

WIP for example component here