Skip to content

Instantly share code, notes, and snippets.

@kjmczk
Created April 30, 2021 08:27
Show Gist options
  • Save kjmczk/4df3cd12e7f5d07bea2c3059a89491a4 to your computer and use it in GitHub Desktop.
Save kjmczk/4df3cd12e7f5d07bea2c3059a89491a4 to your computer and use it in GitHub Desktop.
components/Ingredients.tsx - MDX Blog Simple - Medium
// components/Ingredients.tsx
type Props = {
ingredients: string[];
};
const Ingredients: React.FC<Props> = ({ ingredients }: Props) => {
return (
<>
<h2>Ingredients</h2>
<ul>
{ingredients.map((ingredient, index) => (
<li key={index}>{ingredient}</li>
))}
</ul>
</>
);
};
export default Ingredients;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment