Micro1 interview question

Implement a screenshot they provided in React