some docs

This commit is contained in:
MapleLeaf
2021-12-26 15:05:58 -06:00
parent 7efc7d53c9
commit 51bbdea73e
30 changed files with 2623 additions and 48 deletions

View File

@@ -2,7 +2,7 @@ import { nanoid } from "nanoid"
import React from "react"
import { last } from "../helpers/last.js"
import { ReacordElement } from "./element.js"
import type { ButtonInteraction, ComponentInteraction } from "./interaction"
import type { ComponentInteraction } from "./interaction"
import type { MessageOptions } from "./message"
import { Node } from "./node.js"
@@ -11,9 +11,11 @@ export type ButtonProps = {
style?: "primary" | "secondary" | "success" | "danger"
disabled?: boolean
emoji?: string
onClick: (interaction: ButtonInteraction) => void
onClick: (event: ButtonClickEvent) => void
}
export type ButtonClickEvent = {}
export function Button(props: ButtonProps) {
return (
<ReacordElement props={props} createNode={() => new ButtonNode(props)} />