{languages.map((lang: string) => (
this.setLanguage(lang)}>
{lang}
))}
{snippets
.filter(snippet => snippet.language === language)
.map(snippet => (
this.setSnippet(snippet)}>
{snippet.name}
))}
{snippet.options.length > 0 ? (
Options
{snippet.options.map(option => (
this.handleSetOptionValue(
snippet,
option.id,
// $FlowFixMe: Come back for this
!optionValues[option.id],
)
}
/>
))}
) : (
)}
{supportsCodesandbox ? (
{codesandboxResult ? (
{codesandboxResult.type === 'loading' ? (
'Loading...'
) : codesandboxResult.type === 'error' ? (
`Error: ${codesandboxResult.error}`
) : (
Visit CodeSandbox
)}
) : null}
) : null}