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