ethereum / ethereum-org-website

Ethereum.org is a primary online resource for the Ethereum community.
https://ethereum.org/
MIT License
4.89k stars 4.67k forks source link

TableOfContents #13210

Open corwintines opened 1 week ago

corwintines commented 1 week ago

Create story tests for TableOfContents component

Prerequisite

To get yourself up to speed on how we use storybook on ethereum.org, learn more here

What to do

Nice to have

corwintines commented 1 week ago

@pettinarip I think if we just test just the component from src/components/TableOfContents/index.tsx with a mobile view (believe we use story modes for this) then we should be good

Also, I added a nice to have possible refactor if it seems simple. I will look a bit more into this as well.

pettinarip commented 1 week ago

@corwintines thanks. Ok! yes, I'll take a look at those cases. I'll probably add a separate story for the mobile view since it is not automatically displayed, you need to pass a isMobile prop.