From 777d55dd58264304096ab7523b057207fc65b20f Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Tue, 2 Jun 2026 21:13:44 -0600 Subject: [PATCH] passing children step-2 --- src/App.tsx | 2 +- src/components/Alert.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a59440a..bfc2271 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,7 +4,7 @@ import Alert from "./components/Alert"; function App() { return (
- + Hello Marx
); } diff --git a/src/components/Alert.tsx b/src/components/Alert.tsx index 1b93ac8..526fd95 100644 --- a/src/components/Alert.tsx +++ b/src/components/Alert.tsx @@ -1,10 +1,10 @@ interface Props{ - text: string; + children: string; } -function Alert({text} : Props) { +function Alert({children} : Props) { return ( -
{text}
+
{children}
) }