Skip to content

Commit

Permalink
feat: synth config
Browse files Browse the repository at this point in the history
  • Loading branch information
heypoom committed Apr 8, 2024
1 parent bddb030 commit b85a39f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion canvas/src/blocks/synth.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseBlock } from "@/blocks"
import { BaseBlock, createSchema } from "@/blocks"
import { BlockPropsOf } from "@/types/Node"

type SynthProps = BlockPropsOf<"Synth">
Expand All @@ -12,8 +12,26 @@ export const SynthBlock = (props: SynthProps) => {
sources={1}
targets={1}
className="px-4 py-2 font-mono"
schema={schema}
>
{config} Synth
</BaseBlock>
)
}

const schema = createSchema({
type: "Synth",
fields: [
{
key: "config",
title: "type",
type: "select",
options: [
{ key: "Basic" },
{ key: "AM" },
{ key: "FM" },
{ key: "Noise" },
],
},
],
})

0 comments on commit b85a39f

Please sign in to comment.