react_goods-selector-ruler
v0.0.1
Published
You are given an array of goods. Render them in a table with the ability to select one or clear the selection.
Downloads
2
Readme
React Goods Selector JS
You are given an array of goods. Render them in a table with the ability to select one or clear the selection.
Here is the working version
In this task, we use the Bulma CSS framework. It is already installed and imported so that you may use its classes.
- Write everything inside the
App
(don't create additional components). - Save a
selectedGood
in the state (Jam
is the default value). - Show the name of the selected good in the
h1.title
(Jam is selected
). - Add the
has-background-success-light
class to thetr
of the selected Good. - Show the
ClearButton
button in the title only when a good is selected. ClearButton
should clear the selection by setting an empty string toselectedGood
.- The title should show
No goods selected
when there is no selected good. - Each good should have an
AddButton
to select the good.- only 1 good can be selected at a time;
- Don't show
AddButton
when a good is selected. - Show
RemoveButton
for the selected good to clear the selection.
Instructions
- Install Prettier Extention and use this VSCode settings to enable format on save.
- Implement a solution following the React task guideline.
- Open one more terminal and run tests with
npm test
to ensure your solution is correct. - Replace
<your_account>
with your Github username in the DEMO LINK and add it to the PR description.