Skip to content

Commit a4ef6ad

Browse files
committed
demo: add footer
1 parent 285c042 commit a4ef6ad

File tree

4 files changed

+6334
-6295
lines changed

4 files changed

+6334
-6295
lines changed

example/components/Footer.tsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { HStack, Link, Text } from '@chakra-ui/core';
2+
import { Github } from '@emotion-icons/boxicons-logos/Github';
3+
import * as React from 'react';
4+
5+
export function Footer() {
6+
return (
7+
<HStack margin={4} justify="space-between">
8+
<Link href="https://github.com/frysztak/use-debounced-loader">
9+
<HStack>
10+
<Github size="24px" />
11+
<Text>GitHub</Text>
12+
</HStack>
13+
</Link>
14+
<Text fontSize="sm">Sebastian Frysztak, 2020</Text>
15+
</HStack>
16+
);
17+
}

example/index.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import 'react-app-polyfill/ie11';
22
import * as React from 'react';
33
import * as ReactDOM from 'react-dom';
4-
import { ChakraProvider, extendTheme } from '@chakra-ui/core';
4+
import { Box, ChakraProvider, extendTheme, Flex } from '@chakra-ui/core';
55
import { LoaderDemo } from './LoaderDemo';
6+
import { Footer } from './components/Footer';
67

78
const config = {
89
useSystemColorMode: false,
@@ -13,9 +14,13 @@ const customTheme = extendTheme({ config });
1314
const App = () => {
1415
return (
1516
<ChakraProvider theme={customTheme}>
16-
<div>
17-
<LoaderDemo />
18-
</div>
17+
<Flex minH="100vh" flexDirection="column">
18+
<Box flexGrow={1}>
19+
<LoaderDemo />
20+
</Box>
21+
22+
<Footer />
23+
</Flex>
1924
</ChakraProvider>
2025
);
2126
};

example/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"dependencies": {
1111
"@chakra-ui/core": "^1.0.0-rc.8",
12+
"@emotion-icons/boxicons-logos": "^2.10.0",
1213
"framer-motion": "^2.9.4",
1314
"react-app-polyfill": "^1.0.0",
1415
"react-timing-hooks": "^2.0.0",

0 commit comments

Comments
 (0)