ConsenSysMesh / rimble-ui

React components that implement Rimble's Design System.
https://rimble.consensys.design/
MIT License
462 stars 67 forks source link

Responsive Image component prop #236

Closed MikeLockz closed 5 years ago

MikeLockz commented 5 years ago

Is your feature request related to a problem? Please describe. There is no way to use the Image component responsively.

Describe the solution you'd like Add an optional responsive prop to the Image component which will maintain the aspect ratio of the Image component as the container element grows/shrinks.

Describe alternatives you've considered No other work arounds exist.

MikeLockz commented 5 years ago

If the Image component extended an <image> element we would not have to use a padding hack to maintain aspect ratio. The image would honor the height: auto style property.

ex: https://pricelinelabs.github.io/design-system/Image/

MikeLockz commented 5 years ago

Make it similar to the priceline Image component.