import * as React from 'react'; import styled from 'styled-components'; import { withFilteredProps } from 'ts/utils/filter_props'; interface Props { alt?: string; src?: any; srcset?: any; isCentered?: boolean; } const ImageClass: React.FunctionComponent = (props: Props) => { return ; }; export const Image = styled(withFilteredProps(ImageClass, ['alt', 'src']))` margin: ${props => props.isCentered && `0 auto`}; `;