npm.io
1.0.7 • Published 6 years ago

react-img-rz

Licence
Version
1.0.7
Deps
0
Size
302 kB
Vulns
0
Weekly
0
# use npm
$ npm install --save react-img-rz

# use yarn
$ yarn add --save react-img-rz

Programacion(Uso)

import React from 'react';
import Image from 'react-img-rz';

export class ejemplo extends Component {
  render() {
   let value={img:'path/to/image.jpg',size:240};
    return (
      <>
        <Image
			src={value.img}
			width={value.size}
			height={value.size}
			style={{position: 'initial',display: 'unset',}}
            />
      </>
    );
  }
}

Opciones

name required type default description
src true String '' Path de tu imagen
alt false String '' Descripcion de la Imagen
height true Number 0 Height despues de cambiar su tamaño (solo px)
width true Number 0 Width despues de cambiar su tamaño (solo px)
style false object Estilo de la imagen (style css)

License

This project is licensed under the terms of the MIT license.

Keywords