1import React, { useCallback } from 'react';
2import cn from 'classnames';
3import { Flex } from 'indigo-react';
5import Footer from './Footer';
6import useBreakpoints from 'lib/useBreakpoints';
7import MiniBackButton from './MiniBackButton';
8import { useHistory } from 'store/history';
10// View is a top-level component that all Views must render to inherit styling
19 const { size } = useHistory();
20 const isMobile = useBreakpoints([true, false, false]);
21 const shouldInset = inset && !isMobile;
23 const insetPadding = cn({
28 const goBack = useCallback(() => pop(), [pop]);
30 const showBackButton = size > 1 && !!pop;
41 'mw2 ph9-md ph10-lg': full,
49 style={{ width: '48px' }}
50 className={cn(insetPadding)}>
60 <Flex.Item flex={1} as={Flex} col justify="between">
61 <Flex.Item className={cn('pb5', insetPadding)}>{children}</Flex.Item>
62 <Flex.Item as={Footer.Target} />
65 <Flex.Item style={{ width: '48px' }} className={cn(insetPadding)} />
70// View.Full is sugar for <View full /> to help with readability
71View.Full = function FullView(props) {
72 return <View full {...props} />;
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