add custom tooltip to generate tests input and button

pull/2925/head
Joseph Izang 2 years ago
parent dd5013e0fd
commit 7b21ee8a64
  1. 20
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx

@ -674,6 +674,14 @@ export const SolidityUnitTesting = (props: Record<string, any>) => { // eslint-d
}) })
} }
</datalist> </datalist>
<OverlayTrigger
placement="top-end"
overlay={
<Tooltip className="text-nowrap" id="uiPathInputtooltip">
<span>{"Press 'Enter' to change the path for test files."}</span>
</Tooltip>
}
>
<input <input
list="utPathList" list="utPathList"
className="inputFolder custom-select" className="inputFolder custom-select"
@ -681,21 +689,29 @@ export const SolidityUnitTesting = (props: Record<string, any>) => { // eslint-d
data-id="uiPathInput" data-id="uiPathInput"
name="utPath" name="utPath"
value={inputPathValue} value={inputPathValue}
title="Press 'Enter' to change the path for test files."
style={{ backgroundImage: "var(--primary)" }} style={{ backgroundImage: "var(--primary)" }}
onKeyDown={() => { if (inputPathValue === '/') setInputPathValue('')} } onKeyDown={() => { if (inputPathValue === '/') setInputPathValue('')} }
onChange={handleTestDirInput} onChange={handleTestDirInput}
onClick = {() => { if (inputPathValue === '/') setInputPathValue('')} } onClick = {() => { if (inputPathValue === '/') setInputPathValue('')} }
/> />
</OverlayTrigger>
<OverlayTrigger
placement="top-end"
overlay={
<Tooltip className="text-nowrap" id="uiPathInputButtontooltip">
<span>Create a test folder</span>
</Tooltip>
}
>
<button <button
className="btn border ml-2" className="btn border ml-2"
data-id="testTabGenerateTestFolder" data-id="testTabGenerateTestFolder"
title="Create a test folder"
disabled={disableCreateButton} disabled={disableCreateButton}
onClick={handleCreateFolder} onClick={handleCreateFolder}
> >
Create Create
</button> </button>
</OverlayTrigger>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save