UNPKG

@primer/react-brand

Version:

Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.

25 lines (24 loc) 1.06 kB
import React from 'react'; import { BaseProps } from '../component-helpers'; export declare const ImageBorderRadiusOptions: readonly ["small", "medium", "large", "xlarge", "full"]; export type ImageBorderRadiusOptions = (typeof ImageBorderRadiusOptions)[number]; export type ImageAspectRatio = '1:1' | '16:9' | '16:10' | '4:3' | 'custom'; export type ImageProps = React.ImgHTMLAttributes<HTMLImageElement> & BaseProps<HTMLImageElement> & { src: string; alt: string; aspectRatio?: ImageAspectRatio; media?: string; borderRadius?: ImageBorderRadiusOptions; srcSet?: Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'srcSet'>; } & ({ as?: 'img'; srcSet?: Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'srcSet'>; } | { as: 'picture'; sources?: { srcset: string; media: string; }[]; srcSet?: undefined; }); export declare const Image: ({ animate, aspectRatio, className, as, ref, alt, width, height, media, srcSet, style, borderRadius, ...rest }: ImageProps) => import("react/jsx-runtime").JSX.Element;