Skip to content

Commit

Permalink
chore: adapt docs for pure editor
Browse files Browse the repository at this point in the history
  • Loading branch information
1inxe committed Jul 15, 2023
1 parent 7c5c031 commit 819791f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/doc/docs/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ import 'solive-core/dist/index.css';

Now you can see the SoLive Component on your page:

```solidity solive height="500px" consoleDefaultVisible="true" deployDefaultVisible="true"
```solidity solive height="500px" consoleDefaultVisible="true" deployDefaultVisible="true" mode="standard"
/**
* @filename Storage.sol
*/
Expand Down
4 changes: 2 additions & 2 deletions apps/doc/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SoLive is the first open-source lightweight browser-based Solidity Integrated De

Below is a SoLive Codeblock, try to play with the contract!

```solidity solive height="500px" consoleDefaultVisible="true" deployDefaultVisible="true"
```solidity solive height="500px" consoleDefaultVisible="true" deployDefaultVisible="true" mode="standard"
/**
* @filename Storage.sol
*/
Expand Down Expand Up @@ -57,4 +57,4 @@ SoLive is lightweight and flexible by design. It includes only the essential mod
1. Edit Module: We employ the Monaco Editor as the code editor.
2. Compile Module: We utilize `solcjs` to compile smart contracts based on the chosen Solidity version.
3. Deploy Module: We deploy the compiled contracts to the local EVM using a combination of `ethersjs V5` and `ethereumjs vm`.
4. Interact Module: To interact with the deployed contracts, we use `ethersjs V5` and a custom ABI-UI converter.
4. Interact Module: To interact with the deployed contracts, we use `ethersjs V5` and a custom ABI-UI converter.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react';

import Editor from 'solive-core';
import StandardEditor, { PureEditor } from 'solive-core';
import { v4 as uuidv4 } from 'uuid';

import 'solive-core/dist/index.css';
Expand Down Expand Up @@ -96,9 +96,10 @@ function SoliveCodeBlock(props: SoliveCodeBlockProps) {
modelInfos,
]);

console.log(allProps);
return (
<div style={{ width: allProps.width, maxWidth: '800px', margin: 'auto' }}>
<Editor {...state} />
{allProps.mode === 'standard' ? <StandardEditor {...state} /> : <PureEditor {...state} />}
</div>
);
}
Expand Down

0 comments on commit 819791f

Please sign in to comment.