-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c22451
commit 075d362
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="https://unpkg.com/@babel/standalone@7.17.x/babel.min.js" crossorigin></script> | ||
<script src="https://unpkg.com/react@17.x/umd/react.development.js" crossorigin></script> | ||
<script src="https://unpkg.com/react-dom@17.x/umd/react-dom.development.js" crossorigin></script> | ||
<script src="https://unpkg.com/@uiw/codepen-require-polyfill/index.js" crossorigin></script> | ||
<title>Run Web</title> | ||
<meta name="description" content="Online Code Editor for Rapid Web Development." /> | ||
<meta name="keywords" content="react,component,js,css,html,preview,editor" /> | ||
</head> | ||
<body> | ||
<a href="https://uiwjs.github.io/react-run-web">@uiw/react-run-web</a> | ||
<div id="container" style="padding: 24px"></div> | ||
<script src="https://unpkg.com/@uiw/react-run-web/dist/run-web.min.js"></script> | ||
<script type="text/babel"> | ||
import RunWeb from '@uiw/react-run-web'; | ||
const Demo = () => { | ||
return ( | ||
<RunWeb | ||
css="div {color:red;}" | ||
js="console.log('hello world!')" | ||
html="<div>hello world!</div>" | ||
/> | ||
); | ||
} | ||
ReactDOM.render(<Demo />, document.getElementById('container')); | ||
</script> | ||
</body> | ||
</html> |