diff --git a/library/core/components/action-row.tsx b/library/core/components/action-row.tsx index 639e95b..0711fd7 100644 --- a/library/core/components/action-row.tsx +++ b/library/core/components/action-row.tsx @@ -4,10 +4,31 @@ import { ReacordElement } from "../../internal/element.js" import type { MessageOptions } from "../../internal/message" import { Node } from "../../internal/node.js" +/** + * Props for an action row + * @category Components + */ export type ActionRowProps = { children?: ReactNode } +/** + * An action row is a top-level container for message components. + * + * You don't need to use this; Reacord automatically creates action rows for you. + * But this can be useful if you want a specific layout. + * + * ```tsx + * // put buttons on two separate rows + * + * + * + * + * ``` + * + * @category Components + * @see https://discord.com/developers/docs/interactions/message-components#action-rows + */ export function ActionRow(props: ActionRowProps) { return ( new ActionRowNode(props)}> diff --git a/todo.md b/todo.md index 5620039..0e8cc22 100644 --- a/todo.md +++ b/todo.md @@ -37,6 +37,7 @@ - [ ] combine `MessageOptions` and `Message` into a single message object (?) - [x] consider always calling `deferUpdate` on component interactions +- [ ] more unit tests instead of integration tests probably # cool ideas / polish