forked from boletofacil/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05f558d
commit 7b2a19a
Showing
8 changed files
with
93 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
import { FC } from 'react' | ||
import './styles.scss' | ||
|
||
interface CharacterCardProps { | ||
showDetails: (CharacterCard?: any) => any | ||
showDetails: (record?: any) => any | ||
character: any | ||
} | ||
|
||
const CharacterCard: FC<CharacterCardProps> = ({ character, showDetails }) => ( | ||
<div className="col-12 col-md-6"> | ||
<div className="card mb-3 border-marvel character-card"> | ||
<div className="card-body"> | ||
<img | ||
src={`${character.thumbnail.path}.${character.thumbnail.extension}`} | ||
className="figure-fluid float-left" | ||
alt="Character thumbnail" | ||
/> | ||
function CharacterCard({ character, showDetails }: CharacterCardProps) { | ||
return ( | ||
<div className="col-12 col-md-6"> | ||
<div className="card mb-3 border-marvel character-card"> | ||
<div className="card-body"> | ||
<img | ||
src={`${character.thumbnail.path}.${character.thumbnail.extension}`} | ||
className="figure-fluid float-left" | ||
alt="Character thumbnail" | ||
/> | ||
|
||
<div className="character-card-details"> | ||
<h3 className="card-title text-truncate h5" title={character.name}> | ||
{character.name} | ||
</h3> | ||
<div className="card-text text-center"> | ||
<button | ||
type="button" | ||
className="btn btn-sm btn-marvel w-50 rounded-0" | ||
onClick={showDetails.bind(null, character)} | ||
> | ||
More Details... | ||
</button> | ||
<div className="character-card-details"> | ||
<h3 className="card-title text-truncate h5" title={character.name}> | ||
{character.name} | ||
</h3> | ||
<div className="card-text text-center"> | ||
<button | ||
type="button" | ||
className="btn btn-sm btn-marvel w-50 rounded-0" | ||
onClick={showDetails.bind(null, character)} | ||
> | ||
More Details... | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
) | ||
} | ||
|
||
export default CharacterCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import { FC } from 'react' | ||
import logo from '../../assets/images/logo-marvel.png' | ||
import './styles.scss' | ||
|
||
const Header: FC = () => ( | ||
<div className="container-fluid py-4 bg-marvel"> | ||
<div className="mx-auto w-25"> | ||
<figure className="figure w-100"> | ||
<img className="figure-img img-fluid" src={ logo } alt="Marvel Comics logo" /> | ||
</figure> | ||
function Header() { | ||
return ( | ||
<div className="container-fluid py-4 bg-marvel"> | ||
<div className="mx-auto w-25"> | ||
<figure className="figure w-100"> | ||
<img className="figure-img img-fluid" src={logo} alt="Marvel Comics logo" /> | ||
</figure> | ||
|
||
<div className="h6 text-white px-1 d-flex justify-content-between" aria-hidden="true" style={{ zIndex: 1, marginTop: '-24px' }}> | ||
{'CHARACTERS'.split('').map((letter, index) => <div key={index}>{letter}</div>)} | ||
</div> | ||
<div className="h6 text-white px-1 d-flex justify-content-between" aria-hidden="true" style={{ zIndex: 1, marginTop: '-24px' }}> | ||
{'CHARACTERS'.split('').map((letter, index) => <div key={index}>{letter}</div>)} | ||
</div> | ||
|
||
<h1 className="sr-only"> | ||
Characters of the Marvel Comics Universe | ||
</h1> | ||
<h1 className="sr-only"> | ||
Characters of the Marvel Comics Universe | ||
</h1> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
) | ||
} | ||
|
||
export default Header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from 'react' | ||
import { StrictMode } from 'react' | ||
import ReactDOM from 'react-dom' | ||
import App from './components/App' | ||
import 'jquery' | ||
import 'bootstrap' | ||
import './assets/styles/global.scss' | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
</StrictMode>, | ||
document.getElementById('root'), | ||
) |
7b2a19a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: