-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cli-helpful-errors
- Loading branch information
Showing
22 changed files
with
235 additions
and
44 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.circleci/ @hypnosphi @ndelangen | ||
.github/ @danielduan | ||
|
||
/addons/a11y/ @jbovenschen | ||
/addons/actions/ @rhalff | ||
/addons/background/ @ndelangen @hypnosphi | ||
/addons/centered/ @kazupon | ||
/addons/events/ @z4o4z @ndelangen | ||
/addons/graphql/ @mnmtanish | ||
/addons/info/ @theinterned @z4o4z @UsulPro @hypnosphi @dangreenisrael @danielduan | ||
/addons/jest/ @renaudtertrais | ||
/addons/knobs/ @alexandrebodin @theinterned @leonrodenburg @alterx @hypnosphi | ||
/addons/links/ @hypnosphi @ndelangen | ||
/addons/notes/ @alexandrebodin | ||
/addons/options/ @danielduan @UsulPro | ||
/addons/storyshots/ @igor-dv @thomasbertet @hypnosphi | ||
/addons/storysource/ @igor-dv | ||
/addons/viewport/ @saponifi3d | ||
|
||
/app/angular/ @alterx @igor-dv | ||
/app/polymer/ @ndelangen @naipath @leonrodenburg | ||
/app/react/ @xavcz @shilman @thomasbertet | ||
/app/react-native/ @rmevans9 @danielduan @Gongreg @tmeasday | ||
/app/vue/ @thomasbertet @kazupon | ||
|
||
/docs/ @ndelangen @shilman @hypnosphi | ||
|
||
/examples/angular-cli/ @igor-dv @alterx | ||
/examples/cra-kitchen-sink/ @ndelangen @UsulPro @hypnosphi | ||
/examples/crna-kitchen-sink/ @Gongreg @danielduan | ||
/examples/official-storybook/ @hypnosphi @danielduan @UsulPro | ||
/examples/polymer-cli/ @naipath @igor-dv | ||
/examples/react-native-vanilla/ @tmeasday @danielduan | ||
/examples/vue-kitchen-sink/ @igor-dv @alexandrebodin | ||
|
||
/lib/addons/ @ndelangen @theinterned | ||
/lib/channel-postmessage/ @mnmtanish @ndelangen | ||
/lib/channel-websocket/ @mnmtanish @ndelangen | ||
/lib/channels/ @mnmtanish @ndelangen | ||
/lib/cli/ @hypnosphi @ndelangen @danielduan @shilman @stijnkoopal | ||
/lib/client-logger/ @dangreenisrael | ||
/lib/codemod/ @aaronmcadam @ndelangen | ||
/lib/components/ @ndelangen @hypnosphi @tmeasday | ||
/lib/core/ @tmeasday @igor-dv @alterx | ||
/lib/node-logger/ @dangreenisrael | ||
/lib/ui/ @tmeasday @igor-dv @hypnosphi @ndelangen | ||
|
||
/scripts/ @ndelangen @igor-dv @hypnosphi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { FileReader } from 'global'; | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
|
||
function fileReaderPromise(file) { | ||
return new Promise(resolve => { | ||
const fileReader = new FileReader(); | ||
fileReader.onload = e => resolve(e.currentTarget.result); | ||
fileReader.readAsDataURL(file); | ||
}); | ||
} | ||
|
||
const FilesType = ({ knob, onChange }) => ( | ||
<input | ||
id={knob.name} | ||
type="file" | ||
multiple | ||
onChange={e => Promise.all(Array.from(e.target.files).map(fileReaderPromise)).then(onChange)} | ||
accept={knob.accept} | ||
/> | ||
); | ||
|
||
FilesType.defaultProps = { | ||
knob: {}, | ||
onChange: value => value, | ||
}; | ||
|
||
FilesType.propTypes = { | ||
knob: PropTypes.shape({ | ||
name: PropTypes.string, | ||
}), | ||
onChange: PropTypes.func, | ||
}; | ||
|
||
FilesType.serialize = () => undefined; | ||
FilesType.deserialize = () => undefined; | ||
|
||
export default FilesType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.