Update image uploader to service as avatar as well as uploader

This commit is contained in:
Kurt Hutten
2020-11-03 20:09:31 +11:00
parent faffc0f46d
commit a28f126f9c
5 changed files with 180 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
import ImageUploader from './ImageUploader'
export const generated = () => {
return (
<>
<h3>AspectRatio:1, no initial image, editable</h3>
<
ImageUploader
onImageUpload={({cloudinaryPublicId}) => console.log(cloudinaryPublicId)}
aspectRatio={1}
isEditable={true}
className={"bg-red-400 rounded-half rounded-br-xl"}
/>
<h3>AspectRatio 16:9, no initial image, editable</h3>
<
ImageUploader
onImageUpload={({cloudinaryPublicId}) => console.log(cloudinaryPublicId)}
aspectRatio={16/9}
isEditable={true}
className={"bg-red-400 rounded-xl"}
imageUrl="CadHub/inakek2urbreynblzhgt"
/>
<h3>AspectRatio:1, no initial image, NOT editable</h3>
<
ImageUploader
onImageUpload={({cloudinaryPublicId}) => console.log(cloudinaryPublicId)}
aspectRatio={1}
className={"rounded-half rounded-br-xl"}
/>
<h3>AspectRatio ,16:9 no initial image, NOT editable</h3>
<
ImageUploader
onImageUpload={({cloudinaryPublicId}) => console.log(cloudinaryPublicId)}
aspectRatio={16/9}
className={"rounded-xl"}
imageUrl="CadHub/inakek2urbreynblzhgt"
/>
</>
)
}
export default { title: 'Components/ImageUploader' }