diff --git a/libs/remix-ui/workspace/src/lib/components/createModal.tsx b/libs/remix-ui/workspace/src/lib/components/createModal.tsx new file mode 100644 index 0000000000..81b9d24a08 --- /dev/null +++ b/libs/remix-ui/workspace/src/lib/components/createModal.tsx @@ -0,0 +1,51 @@ +import React from 'react' +import { FormattedMessage } from 'react-intl' + +export const createModalMessage = async ( + defaultName: string, + gitConfigNotSet: boolean, + onChangeTemplateName: (name: string) => void, + onChangeInitGit: (name: string) => void) => { + + return ( + <> + + onChangeTemplateName(e.target.value)} + onInput={(e) => onChangeTemplateName((e.target as any).value)} + /> +
+ onChangeInitGit(e.target.value)} + onInput={(e) => onChangeInitGit((e.target as any).value)} + /> + +
+ {gitConfigNotSet ? ( +
+ +
+ ) : ( + <> + )} + + ) +} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index f6bf6d4184..287691cdb2 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -335,6 +335,12 @@ export function Workspace() { ) } + const createBlankWorkspace = async () => { + global.modal( + + ) + } + const saveSampleCodeWorkspace = () => { const workspaceName = global.plugin.getAvailableWorkspaceName('code-sample') global.modal(