An open API service indexing awesome lists of open source software.

https://github.com/letieu/react-auto-height-image

Avoid zero height when load image
https://github.com/letieu/react-auto-height-image

Last synced: over 1 year ago
JSON representation

Avoid zero height when load image

Awesome Lists containing this project

README

          

# react-auto-height-image
Avoid zero height when loading image

[![demo](https://github.com/letieu/react-auto-height-image/blob/master/ezgif.com-gif-maker.gif "demo")](https://github.com/letieu/react-auto-height-image/blob/master/ezgif.com-gif-maker.gif "demo")

**Example**: use my package on the **left** side

## Install
```bash
yarn add react-auto-height-image
#or
npm install react-auto-height-image
```

## Use

Use with your loading component
```jsx
}
/>
```

Use with fixed height
```jsx

```

## Props
```js

interface AutoHeightImageProps extends React.ImgHTMLAttributes {
loadingComponent?: React.ReactNode,
defaultHeight?: string,
}

```