From 4c9416b1b39d0ee46c994ac0c16f401c885222a4 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Tue, 2 Jun 2026 21:10:34 -0600 Subject: [PATCH] passing children step-1 --- src/App.tsx | 11 +++-------- src/components/Alert.tsx | 11 +++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 src/components/Alert.tsx diff --git a/src/App.tsx b/src/App.tsx index 184e1c1..a59440a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,15 +1,10 @@ -import ListGroup from "./components/ListGroup"; +import Alert from "./components/Alert"; -function App() { - let items = ["New York", "San Francisco", "Tokyo", "London"]; - - const handleSelectItem = (item: string) => { - console.log(item) - } +function App() { return (
- +
); } diff --git a/src/components/Alert.tsx b/src/components/Alert.tsx new file mode 100644 index 0000000..1b93ac8 --- /dev/null +++ b/src/components/Alert.tsx @@ -0,0 +1,11 @@ +interface Props{ + text: string; +} + +function Alert({text} : Props) { + return ( +
{text}
+ ) +} + +export default Alert \ No newline at end of file