0.0.1 • Published 2 years ago
react_goods-selector-ruler v0.0.1
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
selectedGoodin the state (Jamis the default value). - Show the name of the selected good in the
h1.title(Jam is selected). - Add the
has-background-success-lightclass to thetrof the selected Good. - Show the
ClearButtonbutton in the title only when a good is selected. ClearButtonshould clear the selection by setting an empty string toselectedGood.- The title should show
No goods selectedwhen there is no selected good. - Each good should have an
AddButtonto select the good.- only 1 good can be selected at a time;
- Don't show
AddButtonwhen a good is selected. - Show
RemoveButtonfor 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 testto ensure your solution is correct. - Replace
<your_account>with your Github username in the DEMO LINK and add it to the PR description.
0.0.1
2 years ago