بتل کد Battle Codeدارد باز می‌شود…

Step 3: Skills چالش 3 از جلسه‌ی 5، سخت

کامپوننت Skills را بنویس: یک div با id برابر skills و کلاس row که سه span با کلاس badge داخلش است. متن آن‌ها به ترتیب: HTML، CSS، React
بعد <Skills /> را زیر <Bio /> بگذار.

<style>
body { font-family: sans-serif; text-align: center; padding: 16px; }
button, input, select { font-size: 16px; min-height: 40px; margin: 4px; }
.card { max-width: 260px; margin: 12px auto; padding: 16px; border: 2px solid #334155; border-radius: 16px; background: #f8fafc; }
.avatar { font-size: 64px; }
</style>

<div id="root" dir="ltr"></div>

<script type="text/jsx">
import { createRoot } from "react-dom/client";

function Avatar() {
  return <p className="avatar">🦊</p>;
}

function Name() {
  return <h2 id="name">Sara</h2>;
}

function Bio() {
  const age = 13;
  const city = "Tabriz";
  return <p id="bio">{age} years old, from {city}</p>;
}

function App() {
  return (
    <div id="card" className="card">
      <Avatar />
      <Name />
      <Bio />
    </div>
  );
}

createRoot(document.getElementById("root")).render(<App />);
</script>

راهنما و جواب این چالش · برگشت به درس جلسه‌ی 5: پروژه: کارت معرفی من · چالش بعدی: Step 4: Colour and Footer

بیشتر بخوان: جاوااسکریپت چیست؟ از دکمه‌ی وب تا Node.js