1import React from 'react';
2import cn from 'classnames';
4import Grid from './Grid';
5import Flex from './Flex';
6import { HelpText } from './Typography';
8export default function Button({
28 'rel pointer pv4 truncate flex-row justify-between us-none',
33 'bg-green3': success && !disabled,
34 'bg-green1': success && disabled,
35 'bg-black': !success && solid && !disabled,
36 'bg-gray3': !success && solid && disabled,
37 'bg-transparent': !success && !solid,
41 black: !solid && !disabled,
42 gray4: !solid && disabled,
48 pointerEvents: 'none',
49 cursor: 'not-allowed',
52 onClick={!disabled && onClick ? onClick : undefined}
55 <Grid.Item full as={Flex} justify="between" className="z2">
56 <span>{children}</span>
57 <div className={cn('pl4')}>{accessory}</div>
60 <Grid.Item full as={HelpText} className={cn('z2', detailClassName)}>
64 {disabled && disabledDetail && (
65 <Grid.Item full className="f6 black mt1 z2">
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