DocSpace-buildtools/packages/asc-web-components/file-input
Alexey Safronov 9174a20871 Merge branch 'develop' into feature/virtual-rooms-1.2
# Conflicts:
#	packages/asc-web-common/api/portal/index.js
#	packages/asc-web-common/components/Loaders/index.js
#	packages/asc-web-common/store/SettingsStore.js
#	packages/asc-web-components/file-input/index.js
#	packages/asc-web-components/modal-dialog/index.js
#	packages/asc-web-components/save-cancel-buttons/index.js
#	products/ASC.Files/Client/src/components/panels/SelectFileDialog/FilesListRow.js
#	products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js
#	products/ASC.Files/Client/src/components/panels/SelectFolderInput/index.js
#	products/ASC.Files/Client/src/components/panels/StyledPanels.js
#	products/ASC.Files/Client/src/store/ContextOptionsStore.js
#	public/locales/de/Common.json
#	web/ASC.Web.Client/public/locales/en/Settings.json
#	web/ASC.Web.Client/public/locales/ru/Settings.json
#	web/ASC.Web.Client/src/Shell.jsx
#	web/ASC.Web.Client/src/components/NavMenu/index.js
#	web/ASC.Web.Client/src/components/NavMenu/sub-components/header.js
#	web/ASC.Web.Client/src/components/pages/Settings/Layout/Article/Body/index.js
#	web/ASC.Web.Client/src/components/pages/Settings/categories/common/customization.js
#	web/ASC.Web.Client/src/components/pages/Settings/categories/security/access-portal.js
#	web/ASC.Web.Client/src/components/pages/Settings/categories/security/access-rights.js
#	web/ASC.Web.Client/webpack.config.js
#	web/ASC.Web.Editor/src/Editor.jsx
2022-03-24 14:39:52 +03:00
..
file-input.stories.js Web: Components: refactoring stories, add public/images to components for storybook 2021-03-07 14:57:26 +03:00
file-input.test.js Web: Components: changed component hierarchy 2021-02-24 17:42:09 +03:00
index.js Merge branch 'develop' into feature/virtual-rooms-1.2 2022-03-24 14:39:52 +03:00
README.md Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00
styled-file-input.js Web: Components: Fixed file icon going beyond input. (for iOS, macOS) 2022-03-16 12:17:04 +03:00

FileInput

File entry field

Usage

import FileInput from "@appserver/components/file-input";
<FileInput
  placeholder="Input file"
  accept=".doc, .docx"
  onInput={(file) => {
    console.log(
      file,
      `name: ${file.name}`,
      `lastModified: ${file.lastModifiedDate}`,
      `size: ${file.size}`
    );
  }}
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
hasError bool - - false Indicates the input field has an error
hasWarning bool - - false Indicates the input field has a warning
id string - - - Used as HTML id property
isDisabled bool - - false Indicates that the field cannot be used (e.g not authorised, or changes not saved)
name string - - - Used as HTML name property
onInput func - - - Called when a file is selected
placeholder string - - - Placeholder text for the input
scale bool - - false Indicates the input field has scale
size string - base, middle, big, huge, large base Supported size of the input fields.
style obj, array - - - Accepts css style
accept string - - - Specifies files visible for upload