|
1 | 1 | import React from "react"; |
2 | | -import styled, { css } from "styled-components"; |
3 | | - |
4 | | -import { landscapeStyle } from "styles/landscapeStyle"; |
5 | | -import { hoverShortTransitionTiming } from "styles/commonStyles"; |
| 2 | +import clsx from "clsx"; |
| 3 | +import { Link } from "react-router-dom"; |
6 | 4 |
|
7 | 5 | import SecuredByKlerosLogo from "svgs/footer/secured-by-kleros.svg"; |
8 | 6 |
|
9 | 7 | import { socialmedia } from "consts/socialmedia"; |
10 | 8 |
|
11 | 9 | import LightButton from "components/LightButton"; |
12 | | -import { ExternalLink } from "components/ExternalLink"; |
13 | | - |
14 | | -const Container = styled.div` |
15 | | - height: 114px; |
16 | | - width: 100%; |
17 | | - background-color: ${({ theme }) => (theme.name === "dark" ? theme.lightBlue : theme.primaryPurple)}; |
18 | | - display: flex; |
19 | | - flex-direction: column; |
20 | | - justify-content: center; |
21 | | - align-items: center; |
22 | | - padding: 8px; |
23 | | - gap: 16px; |
24 | | -
|
25 | | - ${landscapeStyle( |
26 | | - () => css` |
27 | | - height: 64px; |
28 | | - flex-direction: row; |
29 | | - justify-content: space-between; |
30 | | - padding: 0 32px; |
31 | | - ` |
32 | | - )} |
33 | | -`; |
34 | | - |
35 | | -const StyledSecuredByKlerosLogo = styled(SecuredByKlerosLogo)` |
36 | | - ${hoverShortTransitionTiming} |
37 | | - min-height: 24px; |
38 | | -
|
39 | | - path { |
40 | | - fill: ${({ theme }) => theme.white}BF; |
41 | | - } |
42 | | -
|
43 | | - :hover path { |
44 | | - fill: ${({ theme }) => theme.white}; |
45 | | - } |
46 | | -`; |
47 | | - |
48 | | -const StyledSocialMedia = styled.div` |
49 | | - display: flex; |
50 | | -
|
51 | | - .button-svg { |
52 | | - margin-right: 0; |
53 | | - } |
54 | | -`; |
55 | 10 |
|
56 | 11 | const SecuredByKleros: React.FC = () => ( |
57 | | - <ExternalLink to="https://kleros.io" target="_blank" rel="noreferrer"> |
58 | | - <StyledSecuredByKlerosLogo /> |
59 | | - </ExternalLink> |
| 12 | + <Link to="https://kleros.io" target="_blank" rel="noopener noreferrer"> |
| 13 | + <SecuredByKlerosLogo className="min-h-6 transition duration-100 [&_path]:fill-white/75 hover:[&_path]:fill-white" /> |
| 14 | + </Link> |
60 | 15 | ); |
61 | 16 |
|
62 | 17 | const SocialMedia = () => ( |
63 | | - <StyledSocialMedia> |
| 18 | + <div className="flex [&_.button-svg]:mr-0"> |
64 | 19 | {Object.values(socialmedia).map((site, i) => ( |
65 | | - <ExternalLink key={site.url} to={site.url} target="_blank" rel="noreferrer"> |
| 20 | + <Link key={site.url} to={site.url} target="_blank" rel="noopener noreferrer"> |
66 | 21 | <LightButton Icon={site.icon} text="" /> |
67 | | - </ExternalLink> |
| 22 | + </Link> |
68 | 23 | ))} |
69 | | - </StyledSocialMedia> |
| 24 | + </div> |
70 | 25 | ); |
71 | 26 |
|
72 | 27 | const Footer: React.FC = () => ( |
73 | | - <Container> |
| 28 | + <div |
| 29 | + className={clsx( |
| 30 | + "flex flex-col justify-center items-center gap-4 p-2 w-full h-[114px]", |
| 31 | + "bg-klerosUIComponentsPrimaryPurple dark:bg-klerosUIComponentsLightBlue", |
| 32 | + "lg:h-16 lg:flex-row lg:justify-between lg:px-8" |
| 33 | + )} |
| 34 | + > |
74 | 35 | <SecuredByKleros /> |
75 | 36 | <SocialMedia /> |
76 | | - </Container> |
| 37 | + </div> |
77 | 38 | ); |
78 | 39 |
|
79 | 40 | export default Footer; |
0 commit comments