chore: update styles

This commit is contained in:
email 2022-03-24 21:39:58 +08:00
parent b6e78a1c2d
commit 0fea2a86da
8 changed files with 34 additions and 65 deletions

View file

@ -53,23 +53,16 @@ const DeletedMemo: React.FC<Props> = (props: Props) => {
}; };
return ( return (
<div className={`memo-wrapper ${"memos-" + memo.id}`} onMouseLeave={handleMouseLeaveMemoWrapper}> <div className={`memo-wrapper deleted-memo ${"memos-" + memo.id}`} onMouseLeave={handleMouseLeaveMemoWrapper}>
<div className="memo-top-wrapper"> <div className="memo-top-wrapper">
<span className="time-text">Deleted at {memo.deletedAtStr}</span> <span className="time-text">Deleted at {memo.deletedAtStr}</span>
<div className="btns-container"> <div className="btns-container">
<span className="btn more-action-btn"> <span className="btn restore-btn" onClick={handleRestoreMemoClick}>
<img className="icon-img" src="/icons/more.svg" /> Restore
</span>
<span className={`btn delete-btn ${showConfirmDeleteBtn ? "final-confirm" : ""}`} onClick={handleDeleteMemoClick}>
{showConfirmDeleteBtn ? "Delete!" : "Delete"}
</span> </span>
<div className="more-action-btns-wrapper">
<div className="more-action-btns-container">
<span className="btn restore-btn" onClick={handleRestoreMemoClick}>
Restore
</span>
<span className={`btn delete-btn ${showConfirmDeleteBtn ? "final-confirm" : ""}`} onClick={handleDeleteMemoClick}>
{showConfirmDeleteBtn ? "Delete!" : "Delete"}
</span>
</div>
</div>
</div> </div>
</div> </div>
<div className="memo-content-text" dangerouslySetInnerHTML={{ __html: formatMemoContent(memo.content) }}></div> <div className="memo-content-text" dangerouslySetInnerHTML={{ __html: formatMemoContent(memo.content) }}></div>

View file

@ -82,11 +82,11 @@ const MyAccountSection: React.FC<Props> = () => {
<> <>
<div className="section-container account-section-container"> <div className="section-container account-section-container">
<p className="title-text">Account Information</p> <p className="title-text">Account Information</p>
<label className="form-label input-form-label"> <label className="form-label">
<span className="normal-text">ID:</span> <span className="normal-text">ID:</span>
<span className="normal-text">{user.id}</span> <span className="normal-text">{user.id}</span>
</label> </label>
<label className="form-label input-form-label"> <label className="form-label">
<span className="normal-text">Created at:</span> <span className="normal-text">Created at:</span>
<span className="normal-text">{utils.getDateString(user.createdAt)}</span> <span className="normal-text">{utils.getDateString(user.createdAt)}</span>
</label> </label>

View file

@ -3,29 +3,27 @@
.memo-wrapper { .memo-wrapper {
.flex(column, flex-start, flex-start); .flex(column, flex-start, flex-start);
@apply w-full p-4 px-6 mt-2 bg-white rounded-lg border border-transparent hover:border-gray-200; @apply w-full p-4 px-6 mt-4 first:mt-2 bg-white rounded-lg border border-transparent hover:border-gray-200;
&.deleted-memo {
@apply border-gray-200;
}
> .memo-top-wrapper { > .memo-top-wrapper {
.flex(row, space-between, center); .flex(row, space-between, center);
width: 100%; @apply w-full h-6 mb-1;
height: 24px;
margin-bottom: 4px;
> .time-text { > .time-text {
@apply text-xs; @apply text-xs text-gray-400 cursor-pointer;
color: gray;
cursor: pointer;
} }
> .btns-container { > .btns-container {
.flex(row, flex-end, center); .flex(row, flex-end, center);
position: relative; @apply relative flex-shrink-0;
flex-shrink: 0;
> .more-action-btns-wrapper { > .more-action-btns-wrapper {
.flex(column, flex-start, center); .flex(column, flex-start, center);
position: absolute; @apply absolute flex-nowrap;
flex-wrap: nowrap;
top: calc(100% - 8px); top: calc(100% - 8px);
right: -16px; right: -16px;
width: auto; width: auto;
@ -49,10 +47,7 @@
z-index: 1; z-index: 1;
> .btn { > .btn {
width: 100%; @apply w-full py-2 px-3 rounded;
padding: 8px 0;
padding-left: 24px;
border-radius: 4px;
height: unset; height: unset;
line-height: unset; line-height: unset;
justify-content: flex-start; justify-content: flex-start;
@ -70,24 +65,14 @@
.btn { .btn {
.flex(row, center, center); .flex(row, center, center);
width: 100%; @apply px-2 leading-6 text-sm rounded hover:bg-gray-100;
height: 28px;
font-size: 13px;
border-radius: 4px;
&:hover {
background-color: @bg-whitegray;
}
&.more-action-btn { &.more-action-btn {
width: 28px; @apply w-8 -mr-2 opacity-60;
cursor: unset; cursor: unset;
margin-right: -6px;
opacity: 0.8;
> .icon-img { > .icon-img {
width: 16px; @apply w-4 h-auto;
height: 16px;
} }
&:hover { &:hover {

View file

@ -4,6 +4,10 @@
> .form-label { > .form-label {
min-height: 28px; min-height: 28px;
> .normal-text {
@apply first:mr-2;
}
&.username-label { &.username-label {
> input { > input {
flex-grow: 0; flex-grow: 0;
@ -92,19 +96,14 @@
> .usage-guide-container { > .usage-guide-container {
.flex(column, flex-start, flex-start); .flex(column, flex-start, flex-start);
margin-top: 8px; @apply mt-2 w-full;
> .title-text { > .title-text {
line-height: 2; line-height: 2;
} }
> pre { > pre {
background-color: @bg-whitegray; @apply w-full bg-gray-50 py-2 px-3 text-sm rounded whitespace-pre-wrap;
padding: 8px 12px;
border-radius: 4px;
line-height: 1.4;
word-break: break-all;
white-space: pre-wrap;
} }
} }
} }

View file

@ -3,11 +3,11 @@
.setting-dialog { .setting-dialog {
> .dialog-container { > .dialog-container {
@apply w-3/5 max-w-full mb-8; @apply w-168 max-w-full mb-8;
> .dialog-content-container { > .dialog-content-container {
.flex(column, flex-start, flex-start); .flex(column, flex-start, flex-start);
@apply w-full overflow-y-scroll; @apply w-full overflow-y-scroll px-3;
.hide-scroll-bar(); .hide-scroll-bar();
> .section-container { > .section-container {

View file

@ -27,10 +27,10 @@
> .create-shortcut-btn-container { > .create-shortcut-btn-container {
.flex(row, center, center); .flex(row, center, center);
@apply w-full mt-2 mb-3; @apply w-full mt-4 mb-2;
> .btn { > .btn {
@apply flex py-1 px-2 rounded-lg text-xs border border-dashed border-blue-600; @apply flex p-2 px-4 rounded-lg text-sm border border-dashed border-blue-600;
&:hover { &:hover {
@apply bg-blue-600 text-white; @apply bg-blue-600 text-white;

View file

@ -8,7 +8,6 @@
.flex(column, flex-start, flex-start); .flex(column, flex-start, flex-start);
@apply relative left-full invisible text-base cursor-pointer shadow rounded bg-white mt-6 py-2 px-4; @apply relative left-full invisible text-base cursor-pointer shadow rounded bg-white mt-6 py-2 px-4;
min-width: 6em; min-width: 6em;
min-height: 40px;
transition: all 0.4s ease; transition: all 0.4s ease;
&.showup { &.showup {
@ -22,17 +21,9 @@
> .toast-container { > .toast-container {
> .content-text { > .content-text {
@apply text-base whitespace-pre-wrap; @apply text-sm whitespace-pre-wrap leading-6;
max-width: 160px; max-width: 240px;
} }
} }
&::before {
content: "";
@apply absolute top-3 -right-2;
border-left: 8px solid white;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
} }
} }

View file

@ -5,6 +5,7 @@ module.exports = {
extend: { extend: {
spacing: { spacing: {
128: "32rem", 128: "32rem",
168: "42rem",
}, },
zIndex: { zIndex: {
100: "100", 100: "100",