1.0.5 • Published 2 years ago
static-uploader-react v1.0.5
React Component for Static Uploader (staticuploader.com)
React Example
yarn add static-uploader-react
import StaticUploader from 'static-uploader-react';
import {
useCallback
} from 'react';
export default () => {
const onChange = useCallback(value => {
console.log(value);
});
return (
<StaticUploader aspectRatio={0}
directUpload={false}
max={5}
onChange={onChange}
rounded="md"
shadow="sm"
size="xs"
text=".bmp, .gif, .jpg, .png, .svg or .webp"
title="Click or drag a file to upload."
token="[YOUR_PUBLIC_TOKEN]"
value="https://uploads.staticuploader.com/demo/a9f78af1-2280-44e1-8371-290fcd49c407.1646659406452.jpg"/>
);
};