add modal to show code

This commit is contained in:
MapleLeaf
2022-01-12 20:10:09 -06:00
parent 8ce3834cf4
commit fdd6a3a3cc
8 changed files with 496 additions and 221 deletions

View File

@@ -0,0 +1,26 @@
{/* prettier-ignore */}
```tsx
import * as React from "react"
import { Button, useInstance } from "reacord"
function Counter() {
const [count, setCount] = React.useState(0)
const instance = useInstance()
return (
<>
this button was clicked {count} times
<Button
label="+1"
style="success"
onClick={() => setCount(count + 1)}
/>
<Button
label="delete"
emoji="🗑"
style="danger"
onClick={() => instance.destroy()}
/>
</>
)
}
```