How to use terra-image - 1 common examples

To help you get started, we’ve selected a few terra-image examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerner / terra-core / packages / terra-image / src / terra-dev-site / doc / example / ImageFitTypes.jsx View on Github external
import exampleImage from '../../assets/170x251.jpg';

const cx = classNames.bind(styles);

const propTypes = { fit: PropTypes.string, variant: PropTypes.string };

const ImageFitTypes = ({
  ...props
}) => (
  <div>
    <img src="{exampleImage}" alt="Toggle fit image">
  </div>
);

ImageFitTypes.propTypes = propTypes;
export default FitTypesWrapper(ImageFitTypes);

terra-image

The terra-image component provides styling for visual imagery.

Apache-2.0
Latest version published 2 months ago

Package Health Score

90 / 100
Full package analysis