diff --git a/include-interactive-workshops/include-workshop3-interactive/src/app/basics/page.jsx b/include-interactive-workshops/include-workshop3-interactive/src/app/basics/page.jsx index 21616e2..26cc593 100644 --- a/include-interactive-workshops/include-workshop3-interactive/src/app/basics/page.jsx +++ b/include-interactive-workshops/include-workshop3-interactive/src/app/basics/page.jsx @@ -21,6 +21,16 @@ export default function BasicsPage() { ))} */} + + {team.map((team) => ( +
+ {team.name} +

{team.name}

+

Type: {team.type}

+
+ )) + } +
diff --git a/include-interactive-workshops/include-workshop3-interactive/src/app/pokemonTeam/page.jsx b/include-interactive-workshops/include-workshop3-interactive/src/app/pokemonTeam/page.jsx index c1eca94..fb14608 100644 --- a/include-interactive-workshops/include-workshop3-interactive/src/app/pokemonTeam/page.jsx +++ b/include-interactive-workshops/include-workshop3-interactive/src/app/pokemonTeam/page.jsx @@ -6,6 +6,10 @@ export default function PokemonPage() { // *Insert team type filter here!* // const *Insert pokemon type variable!* = *Insert .filter function here!* => pokemon.type === ["*Insert type here*"] + + const fireTeam = team.filter((pokemon) => pokemon.type === "Fire"); + + return (

Pokémon Team

@@ -14,36 +18,32 @@ export default function PokemonPage() {

.Map Method

Insert Map Function Here!

- {/*Insert .map function here!*/} - - {/* Example skeleton: - {yourData.map((item) => ( -
- { -

{ *item.name* }

-

Category: { *item.category* }

+ {team.map((team) => ( +
+ {team.name} +

{team.name}

+

Type: {team.type}

- ))} - */} + )) + }
+

.Filter Method

-

Insert Filter Function Here!

+

Fire Pokemon

- {/*Insert .map function here!*/} - - {/* Example skeleton: - {yourData.map((item) => ( -
- { -

{ *item.name* }

-

Category: { *item.category* }

+ {/* Insert .map function here! */} + {fireTeam.map((team) => ( +
+ {team.name} +

{team.name}

+

Type: {team.type}

- ))} - */} + )) + }
diff --git a/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorButton.jsx b/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorButton.jsx index 9517f8e..6251853 100644 --- a/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorButton.jsx +++ b/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorButton.jsx @@ -3,12 +3,14 @@ import "./ColorButton.scss"; // ✏️ Step 4: Add props here → it should receive { color, onPick } from the parent. -export default function ColorButton() { +export default function ColorButton({ color, onPick }) { return ( - // ✏️ Step 5: Add a + ); } diff --git a/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorPicker.jsx b/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorPicker.jsx index 2d79f6a..6aceec8 100644 --- a/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorPicker.jsx +++ b/include-interactive-workshops/include-workshop4-interactive/src/app/colorpicker/ColorPicker.jsx @@ -7,21 +7,23 @@ import ColorButton from "./ColorButton"; export default function ColorPicker() { // Step 1: Create a piece of state to track background color. - // Example: const [bg, setBg] = useState("white"); + + const [bg, setBg] = useState("white"); // Step 2: Define your palette array of colors (name + hex value). - // Example: - // const palette = [ - // { name: "Red", hex: "#f87171" }, - // { name: "Blue", hex: "#60a5fa" }, - // { name: "Green", hex: "#34d399" }, - // { name: "Yellow", hex: "#fbbf24" }, - // ]; + + const palette = [ + { name: "Red", hex: "#f87171" }, + { name: "Blue", hex: "#60a5fa" }, + { name: "Green", hex: "#34d399" }, + { name: "Yellow", hex: "#fbbf24" }, + ]; // Temporary fallback so the page runs before we fill in code. // You can remove these after adding your useState and palette above. - const bg = "white"; - const palette = []; + + // const bg = "white"; + // const palette = []; return (
@@ -31,14 +33,15 @@ export default function ColorPicker() {

{/* Step 3: Map through your palette and render a ColorButton for each color. */} - {/* Example: - {palette.map((c) => ( - - ))} - */} + +
+ {palette.map((c) => ( + + ))} +
- + Back to Home