diff --git a/README.md b/README.md index 124a7e2..b8c0c31 100644 --- a/README.md +++ b/README.md @@ -22,23 +22,51 @@ pnpm add reacord react discord.js ## Example - ```tsx -import * as React from "react" -import { Embed, Button } from "reacord" +import { useState } from "react" +import { Embed, EmbedField, Button } from "reacord" + +interface EmbedCounterProps { + count: number + visible: boolean +} + +function EmbedCounter({ count, visible }: EmbedCounterProps) { + if (!visible) return <> + + return ( + + {count % 2 ? "no" : "yes"} + + ) +} function Counter() { - const [count, setCount] = React.useState(0) - return ( - <> - - This button has been clicked {count} times. - - - - ) + const [showEmbed, setShowEmbed] = useState(false) + const [count, setCount] = useState(0) + const instance = useInstance() + + return ( + <> + this button was clicked {count} times + +