add doc tooltip

pull/2262/head
yann300 3 years ago
parent 6995cc33fa
commit 4217b93706
  1. 18
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  2. 7
      libs/remix-ui/solidity-compiler/src/lib/css/style.css

@ -634,7 +634,25 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
</span>
</button>
</OverlayTrigger>
<OverlayTrigger overlay={
<Tooltip id="overlay-tooltip-keybinding">
<div className="remixui_tooltipCode" >
<div>choose the script to execute right after compilation by adding the `dev-run-script` natspec tag, as in:</div>
<pre>
<code>
/**<br />
* @title ContractName<br />
* @dev ContractDescription<br />
* @custom:dev-run-script file_path<br />
*/<br />
contract ContractName {'{}'}<br />
</code>
</pre>
</div>
</Tooltip>
}>
<span className="mt-2 text-dark">Ctrl+Shift+s for compiling and on the fly execution.</span>
</OverlayTrigger>
</header>
</article>
</section>

@ -171,6 +171,13 @@
-o-animation: spin 2s infinite linear;
-webkit-animation: spin 2s infinite linear;
}
.remixui_tooltipCode {
text-align: left !important;
width: 400px !important;
background-color: #000 !important;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }

Loading…
Cancel
Save