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 6b4128abc9..29da7103ba 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -12,6 +12,7 @@ export function Workspace () { const NO_WORKSPACE = ' - none - ' const [currentWorkspace, setCurrentWorkspace] = useState(NO_WORKSPACE) const [selectedWorkspace, setSelectedWorkspace] = useState<{ name: string, isGitRepo: boolean}>(null) + const [showDropdown, setShowDropdown] = useState(false) const global = useContext(FileSystemContext) const workspaceRenameInput = useRef() const workspaceCreateInput = useRef() @@ -149,6 +150,10 @@ export function Workspace () { } } + const toggleDropdown = (isOpen: boolean) => { + setShowDropdown(isOpen) + } + const createModalMessage = () => { return ( <> @@ -258,12 +263,12 @@ export function Workspace () { title='Clone Git Repository'> - + { selectedWorkspace ? selectedWorkspace.name : currentWorkspace === LOCALHOST ? 'localhost' : NO_WORKSPACE } - + { global.fs.browser.workspaces.map(({ name, isGitRepo }, index) => ( -
+
{ toggleDropdown(false) }}>
{ global.fs.browser.isRequestingWorkspace || global.fs.browser.isRequestingCloning ?
: