Skip to content

Commit

Permalink
Merge branch 'feature/imageupload-custom-styles'
Browse files Browse the repository at this point in the history
  • Loading branch information
bearcanrun committed Nov 19, 2018
2 parents b22efd6 + df6a9ad commit 0000bd5
Show file tree
Hide file tree
Showing 7 changed files with 1,269 additions and 975 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const YourComponent = ({ handleAvatar, filename, containerName, avatar, AzureSto
fileName={fileName}
containerName={containerName}
existingImage={avatar}
imagePreviewConfig={{ width: 350, height:'auto', title: 'Change Avatar', fontSize: '24px' }}
imagePreviewConfig={{ width: 350, height:'auto', title: 'Change Avatar', fontSize: '1.5em' }}
cropContainerConfig={{ x: 10, y: 10, width: 200, height: 200 }}
cropPreviewBox={{ width: 350, height: 350 }}
saveImageConfig={{
Expand All @@ -89,6 +89,7 @@ const YourComponent = ({ handleAvatar, filename, containerName, avatar, AzureSto
width: '400px',
overflow: 'visible'
}}
dropzoneStyle={{ height: 200 }}
AzureStorageUrl={AzureStorageUrl}
AzureSASURL={AzureSASURL}
cropRatio={1}
Expand All @@ -108,6 +109,7 @@ export default YourComponent
| `existingImage` | String (url) | Url of pre-existing image. Usually will be same as URL returned from `handleUrl` |
| `imagePreviewConfig` | Object | Existing image preview and change button text |
| `containerStyle` | Object | Style of main container |
| `dropzoneStyle` | Object | Style of dropzone container |
| `cropContainerConfig` | Object | Size and location of cropper on image in crop mode |
| `cropPreviewBox` | Object | Dimensions of cropper preview |
| `cropRatio` | Number | ratio (width/height) image is cropped at eg. 1/1, 4/1, 16/9, 800/150 |
Expand All @@ -119,6 +121,7 @@ export default YourComponent
| Props | Default |
| ------------------ | ------------- |
| `containerStyle` | `{ display: 'block', margin: 0, height: 200, width: 200, overflow: 'visible' }` |
| `dropzoneStyle` | `{ height: 200 }` |
| `imagePreviewConfig` | `{ width: 350, height: auto, title: 'Change Avatar', fontSize: '24px' }` |
| `cropContainerConfig` | `{ x: 10, y: 10, width: 200, height: 200 }` |
|`cropPreviewBox` | `{ width: 350, height: 350 }` |
Expand Down
Loading

0 comments on commit 0000bd5

Please sign in to comment.