diff options
Diffstat (limited to 'packages/website/ts/@next/components/image.tsx')
-rw-r--r-- | packages/website/ts/@next/components/image.tsx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/website/ts/@next/components/image.tsx b/packages/website/ts/@next/components/image.tsx index f49c8c059..34520b619 100644 --- a/packages/website/ts/@next/components/image.tsx +++ b/packages/website/ts/@next/components/image.tsx @@ -3,19 +3,17 @@ import styled from 'styled-components'; interface Props { alt?: string; - src: any; - srcset: any; - center: any; + src?: any; + srcset?: any; + isCentered?: boolean; } const ImageClass: React.FunctionComponent<Props> = (props: Props) => { - const { src, srcset, alt } = props; - return ( - <img src={src} {...props} /> + <img {...props} /> ); }; -export const Image = styled(ImageClass)` - margin: ${(props: Props) => props.center && `0 auto`}; +export const Image = styled(ImageClass)<Props>` + margin: ${props => props.isCentered && `0 auto`}; `; |