docs(share): 📝 Add embed instructions
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user