refactor: add typescript support to project

This commit is contained in:
HD
2022-06-21 15:08:35 +08:00
parent 88ec2b742a
commit bd799ebea8
259 changed files with 1042 additions and 458 deletions
@@ -0,0 +1,21 @@
import React from "react";
import styled from "styled-components";
const Styled = styled.div`
height: 218px;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
`;
export default function Image({ url = "" }) {
if (!url) return null;
return (
<Styled>
<img src={url} />
</Styled>
);
}