diff --git a/src/App.tsx b/src/App.tsx index a53698a..91a7922 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,26 +1,18 @@ import React from 'react'; import logo from './logo.svg'; import './App.css'; +import BeerList from './BeerList'; function App() { + const FavoriteBeers = ["Coreoff","Corona","Mort Subite"] + return (
-
- logo -

- Edit src/App.tsx and save to reload. -

- - Learn React - -
+
+ + ); } -export default App; +export default App; \ No newline at end of file diff --git a/src/Beer.tsx b/src/Beer.tsx new file mode 100644 index 0000000..a720452 --- /dev/null +++ b/src/Beer.tsx @@ -0,0 +1,10 @@ +import * as React from 'react'; + +interface BeerProps{ + name: string; +}; + +const Beer: React.FunctionComponent = (props)=> { + return
{props.name}
+}; +export default Beer; \ No newline at end of file diff --git a/src/BeerList.tsx b/src/BeerList.tsx new file mode 100644 index 0000000..2d914b2 --- /dev/null +++ b/src/BeerList.tsx @@ -0,0 +1,20 @@ +import * as React from 'react'; +import Beer from './Beer'; + +interface BeerListProps{ + beers: string[]; +}; + +const BeerList: React.FunctionComponent= (props)=> { + return( +
+

Liste de vos bières préférées

+
    {props.beers.map((beer,index)=> ( + + ))} +
+
+ ); +}; + +export default BeerList; \ No newline at end of file