Repository files navigation
You are given an array of goods
Display them as a list inside the App (DON'T create additional components)
Add h1 initially saying No goods selected
Save a selectedGood in the App. Let it be Jam by default
The h1 should always show the name of the selected good Jam is selected
The selected good should be highlighted in the list (add CSS class with a background)
Add a button Select next to each good in the list
When you press the button the good becomes selected
Don't show the button next to the selected good
You can select another good by pressing its Select button
Add button X for to the h1 to clear the selection. (Set null)
The clear button should not be visible if there is no selected good
(* Optional) Advanced task
Implement the ability to select multiple goods (use selectedGoods Array)
Use functional setState described in this video
Show Add or Remove instead of Select button
All the selected goods should be listed in the h1:
No goods selected
Jam is selected
Carrot, Jam and Eggs are selected
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Languages
TypeScript
49.9%
HTML
26.1%
JavaScript
22.1%
SCSS
1.9%
You can’t perform that action at this time.