Skip to content

Commit

Permalink
Merge pull request lzxjack#41 from lzxjack/hotfix
Browse files Browse the repository at this point in the history
feat: update animate method
  • Loading branch information
lzxjack authored Mar 31, 2022
2 parents 8bde111 + fe50045 commit 41b2d18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/components/Comment/EditBox/AdminBox/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
justify-content: center;
align-items: center;
@extend .trans;
transform: translate(0, 100%);

.itemBox {
@extend .itemBoxBase;
Expand Down Expand Up @@ -67,6 +68,10 @@
}
}

.showAdmin {
transform: translate(0, 0);
}

@media screen and (max-width: 1240px) {
.itemBoxBase {
height: 30rem;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Comment/EditBox/AdminBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ const AdminBox: React.FC<Props> = ({
}
});

useKeyPress(13, () => adminLogin(), {
useKeyPress(13, adminLogin, {
target: pwdRef
});

return (
<div className={s.adminBox} style={{ top: showAdmin ? '0' : '100%' }}>
<div className={classNames(s.adminBox, { [s.showAdmin]: showAdmin })}>
<div className={s.itemBox}>
<div className={s.adminKey}>邮箱</div>
<input
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}

.hiddenNav {
top: -$navHeight !important;
box-shadow: none !important;
transform: translate(0, -$navHeight);
}

.nav {
Expand Down

0 comments on commit 41b2d18

Please sign in to comment.