1import React from 'react';
2import cn from 'classnames';
4import getComponent from '../lib/getComponent';
6const typeWith = (DefaultComponent, defaultClassName) =>
7 function({ as = DefaultComponent, className, ...rest }) {
8 const Component = getComponent(as);
9 return <Component className={cn(defaultClassName, className)} {...rest} />;
12export const H1 = typeWith('h1');
13export const H2 = typeWith('h2');
14export const H3 = typeWith('h3');
15export const H4 = typeWith('h4');
16export const H5 = typeWith('h5');
17export const H6 = typeWith('h6');
18export const Caption = typeWith('caption');
19export const P = typeWith('p');
21export const Breadcrumb = typeWith('span', 'f6');
22export const Text = typeWith('span', 'f5');
23export const HelpText = typeWith('span', 'f6 gray4');
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