aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/image.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/@next/components/image.tsx')
-rw-r--r--packages/website/ts/@next/components/image.tsx20
1 files changed, 20 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..65b2a9705
--- /dev/null
+++ b/packages/website/ts/@next/components/image.tsx
@@ -0,0 +1,20 @@
+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`};
+`;