feat(markdown): Handle final tutorial view with inline Example
This commit is contained in:
parent
8993b158f8
commit
82abdf2901
2 changed files with 214 additions and 7 deletions
|
@ -96,7 +96,16 @@ const buildExample = (children, settings = { margin: 5 }, tutorial = false, pape
|
|||
}
|
||||
|
||||
// Wrapper component dealing with the tabs and code view
|
||||
const TabbedExample = ({ app, children, caption, tutorial, withHead, paperless, settings }) => {
|
||||
const TabbedExample = ({
|
||||
app,
|
||||
children,
|
||||
caption,
|
||||
tutorial,
|
||||
previewFirst,
|
||||
withHead,
|
||||
paperless,
|
||||
settings,
|
||||
}) => {
|
||||
if (settings)
|
||||
settings = {
|
||||
margin: 5,
|
||||
|
@ -105,7 +114,7 @@ const TabbedExample = ({ app, children, caption, tutorial, withHead, paperless,
|
|||
else settings = { margin: 5 }
|
||||
if (withHead) settings.measurements = { head: 300 }
|
||||
const draft = buildExample(children, settings, tutorial, paperless)
|
||||
if (tutorial)
|
||||
if (tutorial && !previewFirst)
|
||||
return (
|
||||
<div className="my-8">
|
||||
<Tabs tabs="Code, Preview, X-Ray">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue