Files
protocol/packages/website/ts/components/ui/filled_image.tsx
2018-06-12 14:49:42 -07:00

19 lines
452 B
TypeScript

import * as React from 'react';
export interface FilledImageProps {
src: string;
}
export const FilledImage = (props: FilledImageProps) => (
<div
style={{
width: '100%',
height: '100%',
objectFit: 'cover',
backgroundImage: `url(${props.src})`,
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
backgroundSize: 'cover',
}}
/>
);