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

feat: implement FileSelector component #1516

Merged
merged 17 commits into from
May 11, 2020

Conversation

HellWolf93
Copy link
Collaborator

fix: #1507

Changes proposed in this PR:

  • implement FileSelector component

@commit-lint
Copy link

commit-lint bot commented May 2, 2020

Features

  • implement FileSelector component (f60856c)

Bug Fixes

  • import FocusEvent from react types definition (e6049df)
  • export useReduxForm from global hooks (3cb3730)
  • move getIcon and getText to helpers (8d6f1f8)
  • remove StyledInput and use HiddenElement instead (3f006c5)
  • update FileSelector component to comply with comments (67137d2)
  • pass aria props to input (d946643)
  • add edge case to containsFiles when array is empty or undefined (6b07038)
  • type declarations (de361a5)
  • change length for exists (55f4f85)
  • change variant normal for multiline (b9fc201)
  • use native file input (78394c2)
  • send FileList instead of array on cancel (800a59c)
  • update onChange parameter type to FileList (ef77573)

Tests

  • add tests to FileSelector component (134a007)

Contributors

@HellWolf93, @LeandroTorresSicilia

src/components/FileSelector/index.d.ts Outdated Show resolved Hide resolved
src/components/FileSelector/index.js Outdated Show resolved Hide resolved
src/components/FileSelector/index.js Outdated Show resolved Hide resolved
src/components/FileSelector/index.js Outdated Show resolved Hide resolved
src/components/FileSelector/index.js Outdated Show resolved Hide resolved
src/components/FileSelector/index.js Show resolved Hide resolved
@yvmunayev yvmunayev self-requested a review May 7, 2020 11:04
variant?: 'inline' | 'multiline';
hideLabel?: boolean;
accept?: string;
onChange?: (value: Array<File>) => void;
Copy link
Member

@LeandroTorresSicilia LeandroTorresSicilia May 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now we pass a FileList instead of an array

Suggested change
onChange?: (value: Array<File>) => void;
onChange?: (value: FileList) => void;

@TahimiLeonBravo TahimiLeonBravo self-requested a review May 11, 2020 15:52
@LeandroTorresSicilia LeandroTorresSicilia merged commit 85465d1 into nexxtway:master May 11, 2020
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.

feat: implement FileSelector component
4 participants