mirror of https://github.com/usememos/memos.git
chore: update expand text
This commit is contained in:
parent
5950b32c30
commit
7d04ee08f7
|
|
@ -179,7 +179,8 @@ const Memo: React.FC<Props> = (props: Props) => {
|
|||
{state.showAllButtonStatus !== -1 && (
|
||||
<div className="show-all-btn-container">
|
||||
<span className={`btn ${state.showAllButtonStatus === 0 ? "show-all-btn" : "hide-btn"}`} onClick={handleShowMoreBtnClick}>
|
||||
{state.showAllButtonStatus === 0 ? "Show all" : "Hide"}
|
||||
{state.showAllButtonStatus === 0 ? "Expand" : "Fold"}
|
||||
<img className="icon-img" src="/icons/arrow-right.svg" alt="" />
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,9 @@ const MemoTrashDialog: React.FC<Props> = (props: Props) => {
|
|||
locationService.clearQuery();
|
||||
}, []);
|
||||
|
||||
const handleDeletedMemoAction = useCallback((memoId: MemoId) => {
|
||||
const handleDeletedMemoAction = useCallback(async (memoId: MemoId) => {
|
||||
setDeletedMemos((deletedMemos) => deletedMemos.filter((memo) => memo.id !== memoId));
|
||||
await memoService.fetchAllMemos();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -93,14 +93,24 @@
|
|||
@apply w-full relative flex flex-row justify-start items-center;
|
||||
|
||||
> .btn {
|
||||
@apply px-2 py-1 my-1 text-xs rounded-lg border border-blue-600 shadow-inner hover:opacity-80;
|
||||
@apply flex flex-row justify-start items-center px-2 py-1 my-1 text-xs rounded-lg border bg-gray-100 border-gray-200 opacity-80 shadow hover:opacity-60;
|
||||
|
||||
&.show-all-btn {
|
||||
@apply bg-blue-500 text-white mt-2;
|
||||
@apply mt-2;
|
||||
|
||||
> .icon-img {
|
||||
@apply rotate-90;
|
||||
}
|
||||
}
|
||||
|
||||
&.hide-btn {
|
||||
@apply text-blue-600 bg-white;
|
||||
> .icon-img {
|
||||
@apply -rotate-90;
|
||||
}
|
||||
}
|
||||
|
||||
> .icon-img {
|
||||
@apply w-4 h-auto transition-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue