This release enables creation of complex documentation pages, with storybook compatible formats.
It has two main features - MDX support for adding react components to your documentation pages, and Snippet Previews - a system for using Handoff's existing html build process to create complex component previews.
.html in the /integration/snippets file or
run the make:snippet [name] cli commandSnippetPreview
componenthtml file is a Mustache template. At present there are two variables
that can be used in these files{{{style}}} a compressed inline style of either the compiled sass code
or the raw css code provided.{{{script}}} a compressed inline script of the output of the js compilationSnippetPreview. This
component accepts 2 - 3 properties, plus a react fragment as the children.
title accepts a string as the h2 title. Set to false or exclude if you
don't want itid is the name of your snippet {name}.html The snippet will load dynamicalheight accepts a string to set the height of the preview. If you leave it
off, Handoff will set the height of the preview automatically from the contents
of the snippet.1<SnippetPreview title="A Testimonial Component" id="testimonial" height="725px"> 2 <p>Render a testimonial inline with other content.</p> 3</SnippetPreview>
build:snippets <name> will either rebuild all the snippets for you, or if an
optional name is passed, will rebuild a single snippetrename:snippet <source> <destination> will rename a snippet and its js and scss
filesstart command where every doc page would be flagged as
changed on watch.