Skip to content

Conversation

@yhatt
Copy link
Owner

@yhatt yhatt commented Feb 11, 2024

The <FileInput> component provides the file input to <Modal>.

<Modal title="Send resume">
  <FileInput
    label="Resume"
    actionId="resume"
    accept=".pdf,.doc,.docx"
    required
    hint="Attach your resume"
  />
</Modal>

For HTML compatibility, <input type="file" /> is also working. It provides a better interface for web developers.

<Modal title="Post">
  <input label="Title" name="title" required maxLength={200} />
  <textarea label="Message" name="message" required maxLength={2000} />
  <input type="file" label="Attachments" name="attachments" multiple />
  <input type="submit" value="Send" />
</Modal>

Resolves #305.

Warning

Setting MIME types as accept prop are not supported because the Slack platform does not support all file types covered by MIME.

ToDo

  • Implementation
    • <FileInput>
    • <Input type="file">
  • Tests
  • Docs
  • REPL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File input element

2 participants