Files
react/components/page/page-footer.tsx
unix 45e1b0a396 feat(page): add component
feat(page): add header and footer

feat(page): add dot-backdrop decoration
2020-05-07 15:49:34 +08:00

31 lines
665 B
TypeScript

import React from 'react'
import withDefaults from '../utils/with-defaults'
interface Props {
className?: string
}
const defaultProps = {
className: '',
}
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>
export type PageHeaderProps = Props & typeof defaultProps & NativeAttrs
const PageFooter: React.FC<React.PropsWithChildren<PageHeaderProps>> = ({ children, ...props }) => {
return (
<footer {...props}>
{children}
<style jsx>{`
footer {
width: 100%;
position: absolute;
bottom: 0;
}
`}</style>
</footer>
)
}
export default withDefaults(PageFooter, defaultProps)