diff --git a/libs/remix-ui/workspace/src/lib/components/tooltipInput.tsx b/libs/remix-ui/workspace/src/lib/components/tooltipInput.tsx index 443e98dbdd..873e798f19 100644 --- a/libs/remix-ui/workspace/src/lib/components/tooltipInput.tsx +++ b/libs/remix-ui/workspace/src/lib/components/tooltipInput.tsx @@ -1,32 +1,53 @@ -import React, { useState } from 'react' -import { ButtonGroup, Dropdown } from 'react-bootstrap' +import React, { ReactNode, Ref } from 'react' +import { Dropdown, FormControl } from 'react-bootstrap' -export function DeployButton (props: DeployButtonProps) { - const [showOptions, setShowOptions] = useState(false) +// The forwardRef is important!! +// Dropdown needs access to the DOM node in order to position the Menu +const CustomToggle = React.forwardRef(({ children, onClick }: { children?: ReactNode, onClick: (e) => void }, ref: Ref) => ( + { + e.preventDefault() + onClick(e) + }} + > + {children} + +)) - const toggleOptions = () => { - setShowOptions(!showOptions) - } +export const cloneWorkspace = () => { return ( - <> - { props.deployOptions && (props.deployOptions || []).length > 0 ? - - - - - { - (props.deployOptions).map(({ title, active }, index) => { - props.setSelectedIndex(index) - toggleOptions() - }} key={index}> { props.selectedIndex === index ? ✓ {title} : {title} }) - } - - : - - } - + + + {}} + className='far fa-upload remixui_menuicon' + title='Restore Workspaces Backup'> + + + + + {/* + setValue(e.target.value)} + value={value} + /> + */} + {}} + value='' + /> + + ) } \ No newline at end of file