chaesthetics / FrontEnd-Dev

For Meta Certification
0 stars 0 forks source link

Multiple components #9

Open chaesthetics opened 1 year ago

chaesthetics commented 1 year ago

App.js

import "./App.css";
import Card from "./Card";

function App() {
return (
    <div className="App">
        <h1>Task: Add three Card elements</h1>
        <Card h2="First card's h2" h3="First card's h3" />
        <Card h2="Second card's h2" h3="Second card's h3" />
        <Card h2="Third card's h2" h3="Third card's h3" />
    </div>
  );
};

export default App;

Card.js

function Card(props) {
    return (
        <div className="card">
            <h2>{props.h2}</h2>
            <h3>{props.h3}</h3>
        </div>
    );
};

export default Card;

Output; image