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

Loading…
Cancel
Save