refactor: style with tailwind
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user