refactor: restyle some components with tailwind

This commit is contained in:
Tristan Yang
2022-11-14 23:52:00 +08:00
parent 126cbc39a2
commit 734c6ce75b
13 changed files with 64 additions and 225 deletions
+4 -19
View File
@@ -1,22 +1,7 @@
import { FC } from "react";
import toast from "react-hot-toast";
import styled from "styled-components";
import Button from "./styled/Button";
const Styled = styled.span`
display: flex;
align-items: center;
gap: 8px;
strong {
white-space: nowrap;
font-weight: bold;
}
.btns {
gap: 5px;
display: flex;
}
`;
interface Props {
id: string;
handleUpdate: () => void;
@@ -24,9 +9,9 @@ interface Props {
const Index: FC<Props> = ({ id, handleUpdate }) => {
return (
<Styled>
<strong>New Version</strong> Available
<div className="btns">
<div className="flex items-center gap-2">
<strong className="whitespace-nowrap font-bold">New Version</strong> Available
<div className="flex gap-1">
<Button className="mini main" onClick={handleUpdate}>
Update
</Button>
@@ -34,7 +19,7 @@ const Index: FC<Props> = ({ id, handleUpdate }) => {
Dismiss
</Button>
</div>
</Styled>
</div>
);
};