import React from "react"; import Modal from "./modal"; import styled from "styled-components"; import selectedTheme from "../lib/theme"; import { ListContainer, ItemList, Headline, SubHeadline, } from "./elements"; const ModalSubHeadline = styled(SubHeadline)` display: block; padding: 0.5rem 0; `; const Text = styled.p` padding: 0; margin: 0; color: ${selectedTheme.mainColor}; `; const Link = styled.a` display: block; padding: 0; color: ${selectedTheme.mainColor}; text-decoration: none; &:hover { text-decoration: underline; } `; const ItemContainer = styled.div` padding: 1rem 0; `; interface IImprintFieldProps { text: string; link: string; } export interface IImprintProps { name: IImprintFieldProps; address: IImprintFieldProps; phone: IImprintFieldProps; email: IImprintFieldProps; url: IImprintFieldProps; text: string; } interface IImprintFieldComponentProps { field: IImprintFieldProps; } interface IImprintComponentProps { imprint: IImprintProps; } /** * Renders an imprint field * @param {IImprintFieldComponentProps} props - The data for the field */ const ImprintField = ({ field }: IImprintFieldComponentProps) => ( {field.text} ); /** * Renders the imprint component * @param {IImprintProps} props - The contents of the imprint */ const Imprint = ({ imprint }: IImprintComponentProps) => ( <> About Imprint { if (window.location.href.endsWith("#imprint")) { let location = window.location.href.replace("#imprint", ""); window.location.href = location; } }} >
Information in accordance with section 5 TMG <> {imprint.name && } {imprint.address && } {imprint.email && } {imprint.phone && } {imprint.url && }
Imprint {imprint.text && {imprint.text}}
); export default Imprint;