Skip to content

Commit

Permalink
docs: document AttachmentSelectorContext
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Nov 1, 2024
1 parent 5b3ff7e commit dd25c4e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,15 @@ const CustomAttachmentSelector = () => (
<AttachmentSelector getModalPortalDestination={getModalPortalDestination} />
);
```

## AttachmentSelector context

Components rendered as children of `AttachmentSelector` can access `AttachmentSelectorContext`. The context exposes the following properties:

### fileInput

Reference to `input` element of type `file` used to select files to upload. The reference is `null` if the user does not have a permission to upload files.

| Type | Default |
| ------------------ | ------- |
| `HTMLInputElement` | `null` |

0 comments on commit dd25c4e

Please sign in to comment.