fix(footer): flex-end the email
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import styled from "@emotion/styled";
|
import styled from "@emotion/styled";
|
||||||
import { Grid, IconWithContent, Icon, Link, Text } from ".";
|
import { css } from "@emotion/react";
|
||||||
|
import { Grid, IconWithContent, Icon, Link } from ".";
|
||||||
import Envelope from "../icons/envelope.svg";
|
import Envelope from "../icons/envelope.svg";
|
||||||
import Phone from "../icons/phone.svg";
|
import Phone from "../icons/phone.svg";
|
||||||
|
|
||||||
@@ -17,12 +18,24 @@ const Content = styled.div`
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const Cell = styled.div`
|
||||||
|
display: flex;
|
||||||
|
${props =>
|
||||||
|
props.flexEnd &&
|
||||||
|
css`
|
||||||
|
@media (min-width: ${props.flexEnd}) {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
`;
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<Content>
|
<Content>
|
||||||
<Grid columns={[1, 2]}>
|
<Grid columns={[1, 2]} breakpoints={["45em"]}>
|
||||||
|
<Cell>
|
||||||
<IconWithContent>
|
<IconWithContent>
|
||||||
<Icon color="dark" size="lg">
|
<Icon color="dark" size="lg">
|
||||||
<Phone />
|
<Phone />
|
||||||
@@ -31,6 +44,8 @@ export default function Footer() {
|
|||||||
07123 456789
|
07123 456789
|
||||||
</Link>
|
</Link>
|
||||||
</IconWithContent>
|
</IconWithContent>
|
||||||
|
</Cell>
|
||||||
|
<Cell flexEnd={"45em"}>
|
||||||
<IconWithContent>
|
<IconWithContent>
|
||||||
<Icon color="dark" size="lg">
|
<Icon color="dark" size="lg">
|
||||||
<Envelope />
|
<Envelope />
|
||||||
@@ -43,6 +58,7 @@ export default function Footer() {
|
|||||||
quotations@abcprojectdesign.com
|
quotations@abcprojectdesign.com
|
||||||
</Link>
|
</Link>
|
||||||
</IconWithContent>
|
</IconWithContent>
|
||||||
|
</Cell>
|
||||||
</Grid>
|
</Grid>
|
||||||
<div>© {year} Abc Project Ltd</div>
|
<div>© {year} Abc Project Ltd</div>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ const Container = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const IconWrapper = styled.div`
|
const IconWrapper = styled.div`
|
||||||
|
display: flex;
|
||||||
margin-right: var(--spacing-x-sm);
|
margin-right: var(--spacing-x-sm);
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user