site/quartz/components/CustomFooter.tsx

24 lines
692 B
TypeScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import style from "./styles/footer.scss"
2024-10-14 06:21:45 +00:00
import FooterLinksConstructor from "./Footer_links"
2024-10-14 06:09:33 +00:00
interface Options {
links: Record<string, string>
rings: Record<string, string>
}
export default ((opts?: Options) => {
2024-10-14 06:21:45 +00:00
const FooterLinks = FooterLinksConstructor(opts)
const CustomFooter: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
2024-10-14 06:09:33 +00:00
return (
<footer class={`${displayClass ?? ""}`}>
2024-10-14 06:21:45 +00:00
<FooterLinks displayClass={displayClass} cfg={cfg} />
2024-10-14 06:09:33 +00:00
</footer>
)
}
2024-10-14 06:21:45 +00:00
CustomFooter.css = style
return CustomFooter
2024-10-14 06:09:33 +00:00
}) satisfies QuartzComponentConstructor