@tienlucky/storage
TypeScript icon, indicating that this package has built-in type declarations

0.1.53 • Public • Published

PPE React Storage

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

Live demo

Insert gif or link to demo

Setup

Install React Storage with npm

npm install @tienlucky/storage

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

Add API key at .env file.

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

Usage/Examples

import {Image} from '@tienlucky/storage'
import {useEffect, useState} from "react";
import "@tienlucky/storage/src/tienlucky-storage.min.css";

const App = () => {
    const [value, setValue] = useState()

    useEffect(() => {
        console.log('useEffect value', value)
    }, [value])

    return (
        <>
            <Image.SingleUpload
                value={value}
                onChange={setValue}
            />
            <hr/>
            <Image.View image={value}/>
        </>
    )
}

export default App

Support

For support, email tiennv.ppe@gmail.com or join our Slack channel.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @tienlucky/storage

Weekly Downloads

2

Version

0.1.53

License

MIT

Unpacked Size

923 kB

Total Files

114

Last publish

Collaborators

  • tien.luckyfor