split up embed file

This commit is contained in:
MapleLeaf
2021-12-25 04:06:56 -06:00
parent 6747f7bdaf
commit c74f8df231
6 changed files with 120 additions and 105 deletions

View File

@@ -1,6 +1,8 @@
import * as React from "react"
import { Button } from "../src.new/button.js"
import { Embed } from "../src.new/embed.js"
import { EmbedField } from "../src.new/embed/embed-field.js"
import { EmbedTitle } from "../src.new/embed/embed-title.js"
import { Embed } from "../src.new/embed/embed.js"
export function Counter() {
const [count, setCount] = React.useState(0)
@@ -11,10 +13,12 @@ export function Counter() {
this button was clicked {count} times
{embedVisible && (
<Embed>
<Embed.Title>the counter</Embed.Title>
<Embed.Field name="is it even?">
{count % 2 === 0 ? "yes" : "no"}
</Embed.Field>
<EmbedTitle>the counter</EmbedTitle>
{count > 0 && (
<EmbedField name="is it even?">
{count % 2 === 0 ? "yes" : "no"}
</EmbedField>
)}
</Embed>
)}
{embedVisible && (