Procházet zdrojové kódy

create Image component

AykutSarac před 3 roky
rodič
revize
85bae53459
1 změnil soubory, kde provedl 14 přidání a 0 odebrání
  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} />
+};