embed children

This commit is contained in:
MapleLeaf
2021-12-25 03:54:35 -06:00
parent 6f3c97812c
commit bce472ab37
7 changed files with 130 additions and 44 deletions

View File

@@ -10,15 +10,12 @@ export function Counter() {
<>
this button was clicked {count} times
{embedVisible && (
<Embed
title="the counter"
fields={[
{
name: "is it even?",
value: count % 2 === 0 ? "yes" : "no",
},
]}
/>
<Embed>
<Embed.Title>the counter</Embed.Title>
<Embed.Field name="is it even?">
{count % 2 === 0 ? "yes" : "no"}
</Embed.Field>
</Embed>
)}
{embedVisible && (
<Button label="hide embed" onClick={() => setEmbedVisible(false)} />