UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

10 lines (9 loc) 583 B
import { jsx as _jsx } from "react/jsx-runtime"; import { clsx } from 'clsx'; import { forwardRef } from 'react'; import { generateAspectRatioClass } from './generateAspectRatioClass'; /** * @see {@link https://designsystem.amsterdam/?path=/docs/components-media-image--docs Image docs at Amsterdam Design System} */ export const Image = forwardRef(({ aspectRatio, className, width, ...restProps }, ref) => (_jsx("img", { ...restProps, className: clsx('ams-image', generateAspectRatioClass(aspectRatio), className), ref: ref, width: width ?? 600 }))); Image.displayName = 'Image';