From ad7ef9098deb74bfdfd8e65118a2ae99f3ee5478 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Fri, 3 Feb 2023 08:32:38 +0800 Subject: [PATCH] refactor: more tailwind css --- .../component/InviteModal/InviteByEmail.tsx | 89 +++---------------- src/routes/home/User.tsx | 2 +- 2 files changed, 14 insertions(+), 77 deletions(-) diff --git a/src/common/component/InviteModal/InviteByEmail.tsx b/src/common/component/InviteModal/InviteByEmail.tsx index 1dae03ba..fe778b57 100644 --- a/src/common/component/InviteModal/InviteByEmail.tsx +++ b/src/common/component/InviteModal/InviteByEmail.tsx @@ -1,76 +1,12 @@ import { useEffect, useState, ChangeEvent, FC, useRef } from "react"; import toast from "react-hot-toast"; import { useTranslation } from "react-i18next"; -import styled from "styled-components"; import { useSendLoginMagicLinkMutation } from "../../../app/services/auth"; import useInviteLink from "../../hook/useInviteLink"; import QRCode from "../QRCode"; import Button from "../styled/Button"; import Input from "../styled/Input"; -const Styled = styled.div` - padding: 16px 0; - padding-bottom: 0; - .input { - position: relative; - display: flex; - align-items: center; - gap: 8px; - > .copy { - position: absolute; - right: 4px; - top: 50%; - transform: translateY(-50%); - padding-right: 8px; - background: none; - font-weight: 500; - font-size: 14px; - line-height: 20px; - color: #22ccee; - &:hover { - color: #088ab2; - } - } - input { - padding-right: 80px; - &.invite { - padding-right: 50px; - } - } - } - > .invite { - display: flex; - flex-direction: column; - gap: 16px; - margin-bottom: 16px; - } - > .link { - display: flex; - flex-direction: column; - gap: 8px; - margin-bottom: 12px; - } - label { - color: #6b7280; - font-style: normal; - font-weight: 500; - font-size: 14px; - line-height: 20px; - } - > .tip { - color: #344054; - font-weight: 400; - font-size: 12px; - line-height: 18px; - button { - margin-left: 4px; - background: none; - border: none; - color: #22ccee; - } - } -`; - interface Props { cid?: number; } @@ -111,12 +47,13 @@ const InviteByEmail: FC = ({ cid }) => { }; return ( - -
- -
+
+
+ +
= ({ cid }) => {
-
- -
- -
@@ -143,13 +80,13 @@ const InviteByEmail: FC = ({ cid }) => {
{!generating && }
-
+
{t("invite_link_expire")} -
- +
); }; diff --git a/src/routes/home/User.tsx b/src/routes/home/User.tsx index 64161e97..fd170a1c 100644 --- a/src/routes/home/User.tsx +++ b/src/routes/home/User.tsx @@ -16,7 +16,7 @@ const User: FC = ({ uid }) => {
- +