浏览代码

added animation on opening steps description component

develop
Ajay_S 3 年前
父节点
当前提交
75821daad0
共有 4 个文件被更改,包括 39 次插入18 次删除
  1. +0
    -1
      src/pages/interviewRounds/Header.module.scss
  2. +3
    -1
      src/pages/interviewRounds/Header.tsx
  3. +31
    -13
      src/pages/interviewRounds/StepsDescreption.module.scss
  4. +5
    -3
      src/pages/interviewRounds/StepsDescreption.tsx

+ 0
- 1
src/pages/interviewRounds/Header.module.scss 查看文件

@@ -3,7 +3,6 @@ ion-header {
height: 12vh; height: 12vh;
.header { .header {

display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;


+ 3
- 1
src/pages/interviewRounds/Header.tsx 查看文件

@@ -8,7 +8,9 @@ const Header: React.FC = () => {
<IonHeader> <IonHeader>
<div className={styles.header}> <div className={styles.header}>
<IonIcon src={logo}></IonIcon> <IonIcon src={logo}></IonIcon>
<div className={styles.profile}></div>
<div className={styles.profile}>
{/* image */}
</div>
</div> </div>
</IonHeader> </IonHeader>
) )


+ 31
- 13
src/pages/interviewRounds/StepsDescreption.module.scss 查看文件

@@ -6,23 +6,25 @@
justify-content: space-between; justify-content: space-between;
width: 100vw; width: 100vw;
background-color: white; background-color: white;

animation: fadeInAnimation ease-in 0.5s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
padding-top: 1.5rem;


.header { .header {
display: flex; display: flex;
align-items: center; align-items: center;
height: 12vh; height: 12vh;
width: 86.6%; width: 86.6%;

animation: fadeInAnimation ease 0.2s;
animation-iteration-count: 1;
animation-fill-mode: forwards;

.stepName { .stepName {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 18rem; width: 18rem;
margin-left: 14.5vw;
margin-left: 15.5vw;
.step { .step {
color: #A3A3A3; color: #A3A3A3;
font-size: 1.4rem; font-size: 1.4rem;
@@ -33,25 +35,34 @@
color: #363636; color: #363636;
font-size: 2.4rem; font-size: 2.4rem;
font-weight: 300; font-weight: 300;
margin-top: 0.5rem;
} }
} }
} }


.image {
animation: fadeInAnimation ease 0.2s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}

.descreption { .descreption {
color: #868686; color: #868686;
font-size: 1.4rem; font-size: 1.4rem;
width: 80%; width: 80%;
line-height: 2.8rem; line-height: 2.8rem;

animation: fadeInAnimation ease 0.2s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
.button {
animation: fadeInAnimation ease 0.2s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
} }
} }


// .fadeIn {
// transition-delay: 20s;
// transition-property: height;
// transition: opacity 0.5s;
// opacity: 1;
// }

ion-icon { ion-icon {
color: var(--primary-button-color); color: var(--primary-button-color);
width: 1.5rem; width: 1.5rem;
@@ -61,14 +72,21 @@ ion-icon {
ion-button { ion-button {
width: 32.8rem; width: 32.8rem;
height: 4rem; height: 4rem;
font-weight: 400;
font-weight: 500;
font-size: 1.6rem;
font-family: 'Poppins', sans-serif !important;

} }


@keyframes fadeInAnimation { @keyframes fadeInAnimation {
0% { 0% {
opacity: 0; opacity: 0;
height: 0;
transform: scaleY(0)
} }
100% { 100% {
opacity: 1; opacity: 1;
height: auto;
transform: scaleY(1)
} }
} }

+ 5
- 3
src/pages/interviewRounds/StepsDescreption.tsx 查看文件

@@ -1,5 +1,4 @@
import styles from './StepsDescreption.module.scss'; import styles from './StepsDescreption.module.scss';
import img from '../../assets/icons/skill_Information.svg';


import { IonButton, IonIcon } from '@ionic/react'; import { IonButton, IonIcon } from '@ionic/react';
import { lockOpen, lockClosed } from 'ionicons/icons' import { lockOpen, lockClosed } from 'ionicons/icons'
@@ -20,7 +19,7 @@ const StepsDescription: React.FC<Props> = (props) => {
useEffect(() => { useEffect(() => {
if (itemRef && itemRef.current) { if (itemRef && itemRef.current) {


itemRef.current.scrollIntoView();
itemRef.current.scrollIntoView({ block: "start" });
} }
}, [props.stepNumber]); }, [props.stepNumber]);


@@ -40,7 +39,10 @@ const StepsDescription: React.FC<Props> = (props) => {
<div className={styles.descreption}> <div className={styles.descreption}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div> </div>
<IonButton shape="round" color='success' expand='block'>{props.buttonText}</IonButton>

<div className={styles.button}>
<IonButton shape="round" color='success' expand='block'>{props.buttonText}</IonButton>
</div>


</div> </div>
); );


正在加载...
取消
保存