@smileeye.edu.vn/image
v0.1.27
Published
ReactJS/NextJS Library Component for upload/view Image. Easy to use. Upload to S3 server support.
Downloads
32
Readme
SmileEye.Edu.Vn React Image
ReactJS/NextJS Library Component for upload/view Image. Easy to use. Upload to S3 server support.
Live demo
https://link-to-demo
Setup
Install SmileEye.Edu.Vn React Image with npm
npm install @smileeye.edu.vn/image
Get API key at https://link-to-project
Add API key at .env
file.
// ReactJS .env or Antd Pro .env
REACT_APP_CODEBY_STORAGE_URL=https://package-storage.codeby.com
REACT_APP_CODEBY_STORAGE_TOKEN=xxx
REACT_APP_CODEBY_STORAGE_API=xxx
// NextJS .env
NEXT_PUBLIC_CODEBY_STORAGE_URL=https://package-storage.codeby.com
NEXT_PUBLIC_CODEBY_STORAGE_TOKEN=xxx
NEXT_PUBLIC_CODEBY_STORAGE_API=xxx
Usage/Examples
import {ImageSingleUpload, ImageView} from "@smileeye.edu.vn/image";
import {useEffect, useState} from "react";
import "@smileeye.edu.vn/image/src/smileeye.edu.vn-image.min.css";
const App = () => {
const [value, setValue] = useState()
useEffect(() => {
console.log("useEffect value", value)
}, [value])
return (
<>
<ImageSingleUpload
value={value}
onChange={setValue}
/>
<hr/>
<ImageView image={value}/>
</>
)
}
export default App
Support
For support, email [email protected]
or join our Slack channel.
R&D by https://smileeye.edu.vn