0.1.3 • Published 6 years ago

@chantelle/image v0.1.3

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
6 years ago

Image

Installation

yarn add @chantelle/image

React Component

import Image from '@chantelle/image';

ReactDOM.render(
  <Image source="http://via.placeholder.com/350x150" alt="Alternative text" />,
  container
);

SrcSet

import Image from '@chantelle/image';

ReactDOM.render(
  <Image
    source="http://via.placeholder.com/350x150"
    alt="Alternative text"
    sourceSet={[
      {source: "http://via.placeholder.com/350x150", descriptor: "150w", condition: "(max-width: 850px) 150px"},
      {source: "http://via.placeholder.com/350x200", descriptor: "200w", condition: "200px"},
    ]}
  />,
  container
);

CSS API

To use the Image component, add the .pl-image to the <img /> element to apply the styles.

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago