Skip to content

Commit

Permalink
fix: login form UI
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosoul committed Mar 18, 2021
1 parent f835a23 commit f3c6c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/page/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export default function Home() {
comp: <Darkmode />,
tip: 'Dark Mode'
}
].map(({ comp, tip }, idx) => {
].map(({ comp, tip }) => {
return (
<li key={tip} style={{ animationDelay: `.${idx * 1}s` }} className="setting">
<li key={tip} className="setting">
{comp}
<span className="tip">{tip}</span>
</li>
Expand Down
18 changes: 3 additions & 15 deletions src/page/Home/styled.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
import styled, { keyframes } from 'styled-components';
const AniSlide = keyframes`
from {
transform:translateX(100%);
opacity:0;
}
to {
opacity:1;
transform:translateX(0)
}
`;
import styled from 'styled-components';
const StyledWrapper = styled.section`
position: relative;
margin: 0 auto;
Expand Down Expand Up @@ -44,8 +34,7 @@ const StyledWrapper = styled.section`
/* display: none; */
margin-bottom: 0.15rem;
position: relative;
transform: translatex(200%);
/* animation-direction: alternate; */
display: none;
.tip {
visibility: hidden;
position: absolute;
Expand Down Expand Up @@ -84,8 +73,7 @@ const StyledWrapper = styled.section`
}
} */
.setting {
animation: ${AniSlide} 0.5s forwards;
/* display: block; */
display: block;
}
}
}
Expand Down

0 comments on commit f3c6c5e

Please sign in to comment.