|
|
|
@ -31,6 +31,7 @@ export type Props = {
|
|
|
|
noWrapper?: boolean
|
|
|
|
noWrapper?: boolean
|
|
|
|
isExpand?: boolean
|
|
|
|
isExpand?: boolean
|
|
|
|
showFileList?: boolean
|
|
|
|
showFileList?: boolean
|
|
|
|
|
|
|
|
showCodeGenerator?: boolean
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export const languageMap = {
|
|
|
|
export const languageMap = {
|
|
|
|
@ -63,6 +64,7 @@ const CodeEditor: FC<Props> = ({
|
|
|
|
noWrapper,
|
|
|
|
noWrapper,
|
|
|
|
isExpand,
|
|
|
|
isExpand,
|
|
|
|
showFileList,
|
|
|
|
showFileList,
|
|
|
|
|
|
|
|
showCodeGenerator = false,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const [isFocus, setIsFocus] = React.useState(false)
|
|
|
|
const [isFocus, setIsFocus] = React.useState(false)
|
|
|
|
const [isMounted, setIsMounted] = React.useState(false)
|
|
|
|
const [isMounted, setIsMounted] = React.useState(false)
|
|
|
|
@ -207,6 +209,7 @@ const CodeEditor: FC<Props> = ({
|
|
|
|
codeLanguages={language}
|
|
|
|
codeLanguages={language}
|
|
|
|
fileList={fileList}
|
|
|
|
fileList={fileList}
|
|
|
|
showFileList={showFileList}
|
|
|
|
showFileList={showFileList}
|
|
|
|
|
|
|
|
showCodeGenerator={showCodeGenerator}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{main}
|
|
|
|
{main}
|
|
|
|
</Base>
|
|
|
|
</Base>
|
|
|
|
|