aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/image.tsx
blob: f49c8c059922386b1027d53a24c907d6b0c766f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import * as React from 'react';
import styled from 'styled-components';

interface Props {
    alt?: string;
    src: any;
    srcset: any;
    center: any;
}

const ImageClass: React.FunctionComponent<Props> = (props: Props) => {
    const { src, srcset, alt } = props;

    return (
        <img src={src} {...props} />
    );
};

export const Image = styled(ImageClass)`
    margin: ${(props: Props) => props.center && `0 auto`};
`;