Fix website errors related to props/children
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { withFilteredProps } from 'ts/utils/filter_props';
|
||||
|
||||
interface Props {
|
||||
alt?: string;
|
||||
@@ -12,6 +13,6 @@ const ImageClass: React.FunctionComponent<Props> = (props: Props) => {
|
||||
return <img {...props} />;
|
||||
};
|
||||
|
||||
export const Image = styled(ImageClass)<Props>`
|
||||
export const Image = styled(withFilteredProps(ImageClass, ['alt', 'src']))<Props>`
|
||||
margin: ${props => props.isCentered && `0 auto`};
|
||||
`;
|
||||
|
Reference in New Issue
Block a user