Compare commits

..

2 Commits

@ -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 (
<div>
<ListGroup items={items} heading="Cities" onSelectItem={handleSelectItem}/>
<Alert>Hello Marx</Alert>
</div>
);
}

@ -0,0 +1,11 @@
interface Props{
children: string;
}
function Alert({children} : Props) {
return (
<div className="alert alert-primary">{children}</div>
)
}
export default Alert
Loading…
Cancel
Save