1import React from 'react';
2import cn from 'classnames';
3import { Grid, Flex } from 'indigo-react';
5export default function Tabs({
14 const Tab = views[currentTab];
17 <Grid className={className}>
18 <Grid.Item full as={Flex} className="b-gray3 bb1 scroll-x hidden-y">
19 <Flex.Item as={Flex} className="flex1">
20 {options.map((option, i) => {
21 const isActive = option.value === currentTab;
22 const isFirst = i === 0;
27 onClick={() => onTabChange(option.value)}
29 'f5 pv3 pointer nowrap',
31 'black b-black bb1': isActive,
35 't-center flex1': center,
38 // all items have right margin/padding
40 // the first one is flush to the left
41 'ml2 pl2': !isFirst && !center,
50 <Grid.Item full as={Tab} {...rest} />
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list