From 3a13286585eb1399247b808c6d45849db9d94a2d Mon Sep 17 00:00:00 2001 From: Fred Carlsen Date: Fri, 30 Nov 2018 16:03:49 +0100 Subject: Added about / mission --- packages/website/ts/@next/components/image.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/website/ts/@next/components/image.tsx (limited to 'packages/website/ts/@next/components/image.tsx') diff --git a/packages/website/ts/@next/components/image.tsx b/packages/website/ts/@next/components/image.tsx new file mode 100644 index 000000000..f49c8c059 --- /dev/null +++ b/packages/website/ts/@next/components/image.tsx @@ -0,0 +1,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) => { + const { src, srcset, alt } = props; + + return ( + + ); +}; + +export const Image = styled(ImageClass)` + margin: ${(props: Props) => props.center && `0 auto`}; +`; -- cgit v1.2.3 From 4da419cf7591a8beb32fb5e41e31b129c5fbb99f Mon Sep 17 00:00:00 2001 From: Ezekiel Aquino Date: Tue, 4 Dec 2018 14:58:37 +0100 Subject: Fixes all lint issues, cleanup --- packages/website/ts/@next/components/image.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'packages/website/ts/@next/components/image.tsx') 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) => { - const { src, srcset, alt } = props; - return ( - + ); }; -export const Image = styled(ImageClass)` - margin: ${(props: Props) => props.center && `0 auto`}; +export const Image = styled(ImageClass)` + margin: ${props => props.isCentered && `0 auto`}; `; -- cgit v1.2.3