Created
April 11, 2019 19:18
-
-
Save adrian-afergon/2f0702c0439e8daa64304e5f2f42cf12 to your computer and use it in GitHub Desktop.
This is an example about react component
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
import * as React from 'react'; | |
import './ExerciseDetail.scss'; | |
// ... more irrelevant imports for this example | |
interface ExerciseDetailsProp { | |
exercise: Exercise | |
} | |
export const ExerciseDetail: React.FC<ExerciseDetailsProp> = ({exercise}) => ( | |
<div className="ExerciseDetail"> | |
<Image src={exercise.image} /> | |
{exercise.tags.map((tag) => <Chip>{tag}</Chip>)} | |
<Content> | |
{ exercise.warning && <Message>{exercise.warning}</Message> } | |
{/* irrelevant content for this example */} | |
</Content> | |
</div> | |
); | |
ExerciseDetail.displayName = 'ExerciseDetail'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment