0.1.4 • Published 2 years ago

@ppe.edu/image v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

PPE React Image

React Library Component for upload/view Image. Easy to use. Upload to server support.

Live demo

Insert gif or link to demo

Setup

Install React Storage with npm

npm install @ppe.edu/image

Get API key at https://link-to-project

Add API key at .env file.

REACT_APP_CODEBY_STORAGE_URL=https://package-storage.codeby.com
REACT_APP_CODEBY_STORAGE_TOKEN=xxx

Usage/Examples

import {ImageSingleUpload, ImageView} from '@ppe.edu/image'
import {useEffect, useState} from "react";
import "@ppe.edu/image/src/ppe.edu-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 tiennv.ppe@gmail.com or join our Slack channel.

License

MIT