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({
29 const Component = getComponent(as);
35 [`half-${half}`]: half,
36 [`third-${third}`]: third,
37 [`fourth-${fourth}`]: fourth,
40 [`r${rows[0]}-${rows[1]}`]: rows.length === 2,
41 [`c${cols[0]}-${cols[1]}`]: cols.length === 2,
44 [`justify-self-${justifySelf}`]: justifySelf,
45 [`align-self-${alignSelf}`]: alignSelf,
54Grid.Divider = function GridDivider({ vertical = false, className, ...rest }) {
58 height: vertical ? 'auto' : '1px',
59 width: vertical ? '1px' : 'auto',
61 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