Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create team member component #29

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import React from 'react';
import TeamMember from './components/TeamMember';

function App() {
return (
<div>
<h1 className="text-2xl bg-lightblue">The Movie Bubble</h1>
<TeamMember isRight/>
<TeamMember />
<TeamMember isRight/>
<TeamMember />
<TeamMember isRight/>

</div>
);
}
Expand Down
39 changes: 39 additions & 0 deletions src/components/TeamMember.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React, { useEffect } from 'react';
import AOS from 'aos';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add AOS to the dependencies in package.json

import 'aos/dist/aos.css';
import Img1 from './images/test2.jpg';
import Img2 from './images/test4.jpg';

export default function TeamMember (props){
useEffect(() => {
AOS.init({
duration: 2000,
});
});
const isRight = props.isRight;
if (isRight)
return (
<>
<div className="aboutus w-full bg-gray-900 flex overflow-hidden">
<div className="black" data-aos="fade-right">
<img className="aboutus__member" alt="hi" src={Img1}></img>
</div>
<div className="orange" data-aos="fade-left">
<h3 className="aboutus__name">{props.aboutus__name}</h3>
</div>
</div>
</>
);
return (
<>
<div className="aboutus w-full bg-gray-900 flex flex-row-reverse overflow-hidden">
<div className="black-left" data-aos="fade-right">
<img className="aboutus__member" alt="" src={Img2}></img>
</div>
<div className="orange-left" data-aos="fade-left">
<h3 className="aboutus__name">{props.aboutus__name}</h3>
</div>
</div>
</>
);
};
Binary file added src/components/images/test2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/components/images/test4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading