浏览代码

create Image component

AykutSarac 3 年之前
父节点
当前提交
85bae53459
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      src/components/Image/index.tsx

+ 14 - 0
src/components/Image/index.tsx

@@ -0,0 +1,14 @@
+import React from 'react';
+import styled from 'styled-components';
+
+const StyledImage = styled.img`
+  object-fit: contain;
+  
+  @media only screen and (max-width: 768px) {
+    width: 100%;
+  }
+`;
+
+export const Image = ({ ...props }) => {
+  return <StyledImage {...props} />
+};