Skip to content

Commit

Permalink
feat: add decomposition guide for attachments (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Sep 9, 2024
1 parent b48fbcc commit 3d57098
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions apps/docs/content/docs/ui/styled/Decomposition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,39 @@ The button to send the message.

Sends a cancel action.

### Composer.Attachments

Renders attachments.

### Composer.AddAttachment

Renders an add attachment button.

## ComposerAttachment

Renders an attachment.

```tsx
import { ComposerAttachment } from "@assistant-ui/react";

const MyComposerAttachment: FC = () => {
return (
<ComposerAttachment.Root>
attachment
<ComposerAttachment.Remove />
</ComposerAttachment.Root>
);
};
```

### ComposerAttachment.Root

Contains all parts of the composer attachment.

### ComposerAttachment.Remvoe

Renders a remove attachment button.

## AssistantMessage

Renders an assistant message.
Expand Down Expand Up @@ -382,6 +415,7 @@ import { UserMessage } from "@assistant-ui/react";
const MyUserMessage: FC = () => {
return (
<UserMessage.Root>
<UserMessage.Attachments />
<UserMessage.Content />
<UserActionBar />
<BranchPicker />
Expand Down Expand Up @@ -410,6 +444,10 @@ Contains all parts of the user message.

The content of the user message.

### UserMessage.Attachments

Renders attachments.

## UserActionBar

Renders the action bar for the user message.
Expand Down Expand Up @@ -446,6 +484,22 @@ Contains all parts of the user action bar.

Shows an edit button.

## UserAttachment

Renders an attachment.

```tsx
import { UserAttachment } from "@assistant-ui/react";

const MyUserAttachment: FC = () => {
return <UserAttachment.Root>attachment</UserAttachment.Root>;
};
```

### UserAttachment.Root

Contains all parts of the user attachment.

## EditComposer

Renders a user message being edited.
Expand Down

0 comments on commit 3d57098

Please sign in to comment.