aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/filled_image.tsx
blob: 7f58ee5b9fe866fbdb551ed872ad345fa6c68b39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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',
        }}
    />
);