refactor: style with tailwind

This commit is contained in:
Tristan Yang
2022-12-30 14:39:25 +08:00
parent fbde6f3d92
commit 4a973ee07a
11 changed files with 41 additions and 264 deletions
+1 -13
View File
@@ -1,16 +1,4 @@
import { useState, useEffect, FC } from "react";
import styled from "styled-components";
const Styled = styled.div`
height: 218px;
padding: 15px 15px 0 15px;
line-height: 1.4;
overflow: scroll;
white-space: pre-wrap;
word-break: break-all;
background-color: #000;
color: #eee;
`;
interface Props {
url: string;
@@ -29,7 +17,7 @@ const Code: FC<Props> = ({ url }) => {
}, [url]);
if (!content) return null;
return <Styled>{content}</Styled>;
return <div className="h-[218px] p-[15px] pb-0 bg-black text-white overflow-scroll whitespace-pre-wrap break-all leading-snug">{content}</div>;
};
export default Code;