1import React from 'react';
2import cn from 'classnames';
4import getComponent from '../lib/getComponent';
6function Grid({ as = 'div', gap = 0, className, ...rest }) {
7 const Component = getComponent(as);
10 className={cn('grid12', gap && `gap${gap}`, className)}
16Grid.Item = function GridItem({
27 const Component = getComponent(as);
33 [`half-${half}`]: half,
34 [`third-${third}`]: third,
35 [`fourth-${fourth}`]: fourth,
38 [`r${rows[0]}-${rows[1]}`]: rows.length === 2,
39 [`c${cols[0]}-${cols[1]}`]: cols.length === 2,
48Grid.Divider = function GridDivider({ vertical = false, className, ...rest }) {
52 height: vertical ? 'auto' : '1px',
53 width: vertical ? '1px' : 'auto',
55 className={cn('full', className || 'bg-gray2')}
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