Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/usrrname/tab-component-demo

Created with CodeSandbox // example of a tab component
https://github.com/usrrname/tab-component-demo

react reactcontext typescript

Last synced: 29 days ago
JSON representation

Created with CodeSandbox // example of a tab component

Awesome Lists containing this project

README

        

## Tab Component Demo

A ham-fisted demo based off interpretation of Figma file https://www.figma.com/file/nomdaznu2CczB9UJXuXpnI/branch/7gSowr4KPLcypwNpSpaY8R/Untitled?node-id=0%3A1

Used dummy JSON from https://jsonplaceholder.typicode.com/users/1/posts

The values in this api change frequently.

### Libs and Tools

- React
- Typescript
- Styled Components

Search `TODO:` for dev notes

### Imagined requirements:

- initial selected tab is `1`
- focus and selection should be different
- show right chevron `>` when more than 7 results
- show left chevron `<` before first tab when results from 7+1 to the end are (not a great pagination solution for now, should replace with min and max values)