0.2.5 • Published 1 year ago

abdulimageuploader2 v0.2.5

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

How to configure

import { useState } from 'react';

import { ImageUploader } from 'abdulimageuploader2';

function App() {

const file,setFile=useState(null);

const handleSubmit=async(e)=>{ console.log(file) }

return (

<div className='container d-flex justify-content-center mt-5 ' >
  <div className=' border border-dark pb-5 px-3'>
    <h4 className='text-center '>Image Uploader</h4>
    <form onSubmit={handleSubmit} >

      <ImageUploader value={setFile}/>
      
      <button type='submit' className='btn btn-info mt-1 '>Submit</button>

    </form>
  </div>

</div>

); }

export default App;

Props :

  • value : it must be a useState setfunction and it should be provided as props, to get the file uploaded from the component.
  • updateColor : used to configure the color of update button (default is green)
  • deleteColor : used to configure the color of delete button (default is red)
  • buttonColor : used to configure the background color of button in the modal (default is gray)
  • buttonTextColor: used to configure the color of the button text in the modal (default is white)
0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago