Skip to content

Commit

Permalink
add preact example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
agneym committed Nov 18, 2019
1 parent fc47524 commit 454d6af
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ import Playground from "@agney/playground";

const App = () => {
const snippet = {
markup: `<h1>Content</h1>`,
css: `h1 {color: red}`,
javascript: `console.log('this')`,
markup: `<div id=app />`,
css: ``,
javascript: `import { h, Component, render } from 'preact';
import htm from 'htm';
const html = htm.bind(h);
const app = html\`<div>Hello World from Playground!</div>\`
render(app, document.getElementById('app'));
`,
};
return (
<Playground
id="example"
initialSnippet={snippet}
defaultEditorTab="css"
defaultResultTab="console"
defaultEditorTab="javascript"
/>
);
};
Expand Down

0 comments on commit 454d6af

Please sign in to comment.