Create a Component Library
for an online Music
, Video Games
, and Movies
store.
You work for a large scale ecommerce website that sells music, video games, and movies. your team wants consistent and reusable components across the website, so your assignment is to create a component library to support the project.
- Create a new project
- Install storybook.js
- Create poster
- create poster grid
- create media details
- Add storyshots
- create app
- storybook.js
- storyshots
- react
The most visually appealing way to display a colllection of media is to use the poster or album artwork in any easy-to-use way like a grid.
create a new component library with storybook.js that includes the following base components:
- poster: a single media item represented by its artwork.
- poster grid: a grid of posters.
- media details: a media item's data including poster.
Maintaining a component library includes making sure the components always work. to do this, we can use snapshot testing to automatically test our components.
use the storybook add-on storyshots to add snapshot testing.
The purpose of building a component library is to use it in a project. using your newly created component library, create a new react app using your favourite framework that shows the store's available music, video games, and movies (or your favourite of each).