Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<FileInput> / <Input type="file"> input component for the file input element #314

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

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
1 participant