Skip to content

Commit

Permalink
default footer
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed May 3, 2021
1 parent f20c32d commit 2f11e52
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 3 deletions.
24 changes: 22 additions & 2 deletions packages/material/src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
import { Fragment } from 'react';
import React from 'react';
import { useComponents } from '@wq/react';

export default Fragment;
export default function Footer() {
const { Typography, FooterContent } = useComponents();

return (
<div
style={{
height: '3em',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'white',
borderTop: '1px solid rgba(0, 0, 0, 0.12)'
}}
>
<Typography variant="caption" color="textSecondary">
<FooterContent />
</Typography>
</div>
);
}
14 changes: 14 additions & 0 deletions packages/material/src/components/FooterContent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { useComponents } from '@wq/react';

export default function FooterContent() {
const { Link } = useComponents();
return (
<>
Powered by{' '}
<Link component="a" href="https://wq.io/" target="_blank">
wq
</Link>
</>
);
}
3 changes: 3 additions & 0 deletions packages/material/src/components/FooterContent.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Fragment } from 'react';

export default Fragment;
2 changes: 2 additions & 0 deletions packages/material/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Container from './Container';
import Header from './Header';
import Main from './Main';
import Footer from './Footer';
import FooterContent from './FooterContent';
import View from './View';
import ScrollView from './ScrollView';
import HorizontalView from './HorizontalView';
Expand Down Expand Up @@ -52,6 +53,7 @@ export {
Header,
Main,
Footer,
FooterContent,
View,
ScrollView,
HorizontalView,
Expand Down
10 changes: 9 additions & 1 deletion packages/react/src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import React from 'react';
import { useComponents } from '../hooks';

export default function Footer() {
return <></>;
const { FooterContent } = useComponents();
return (
<center>
<small>
<FooterContent />
</small>
</center>
);
}
12 changes: 12 additions & 0 deletions packages/react/src/components/FooterContent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';

export default function FooterContent() {
return (
<>
Powered by{' '}
<a href="https://wq.io/">
<b>wq</b>
</a>
</>
);
}
2 changes: 2 additions & 0 deletions packages/react/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Container from './Container';
import Header from './Header';
import Main from './Main';
import Footer from './Footer';
import FooterContent from './FooterContent';
import View from './View';
import ScrollView from './ScrollView';
import HorizontalView from './HorizontalView';
Expand Down Expand Up @@ -59,6 +60,7 @@ export {
Header,
Main,
Footer,
FooterContent,
View,
ScrollView,
HorizontalView,
Expand Down

0 comments on commit 2f11e52

Please sign in to comment.