2
0

docs(share): 📝 Add embed instructions

This commit is contained in:
Baptiste Arnaud
2022-02-09 17:41:45 +01:00
parent d6238b3474
commit 65b30bfc48
41 changed files with 2038 additions and 214 deletions

View File

@@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react'
type Props = {
value: string
lang: 'css' | 'json'
lang?: 'css' | 'json'
onChange?: (value: string) => void
isReadOnly?: boolean
}
@@ -46,7 +46,8 @@ export const CodeEditor = ({
basicSetup,
EditorState.readOnly.of(isReadOnly),
]
extensions.push(lang === 'json' ? json() : css())
if (lang === 'json') extensions.push(json())
if (lang === 'css') extensions.push(css())
const editor = new EditorView({
state: EditorState.create({
extensions,

View File

@@ -7,3 +7,7 @@ export const Info = (props: AlertProps) => (
{props.children}
</Alert>
)
export const PublishFirstInfo = (props: AlertProps) => (
<Info {...props}>You need to publish your typebot first</Info>
)