77 ImageColorSchemeSwitchType ,
88} from "./ImageColorSchemeSwitch" ;
99
10- interface FooterLinksProps {
10+ interface FooterLinksProps extends React . HTMLProps < HTMLDivElement > {
1111 children : React . ReactElement < LinkProps > | React . ReactElement < LinkProps > [ ] ;
1212}
1313
@@ -18,7 +18,7 @@ interface FooterProps extends React.HTMLProps<HTMLDivElement> {
1818 children ?: React . ReactElement | React . ReactElement [ ] ;
1919}
2020
21- const FooterLinks = ( { children } : FooterLinksProps ) => {
21+ const FooterLinks = ( { children, ... props } : FooterLinksProps ) => {
2222 return (
2323 < div
2424 style = { {
@@ -29,6 +29,7 @@ const FooterLinks = ({ children }: FooterLinksProps) => {
2929 display : "flex" ,
3030 flexWrap : "wrap" ,
3131 } }
32+ { ...props }
3233 >
3334 { children }
3435 </ div >
@@ -48,7 +49,11 @@ const FooterLink = ({ children, ...props }: LinkProps) => {
4849 textDecoration : "none" ,
4950 color : theme . palette . primary . contrastText ,
5051 marginLeft : "1.5rem" ,
52+ marginBottom : "4px" ,
53+ paddingBottom : "4px" ,
54+ lineHeight : 1 ,
5155 cursor : "pointer" ,
56+ borderBottom : "solid transparent 4px" ,
5257 } }
5358 { ...props }
5459 >
@@ -80,35 +85,45 @@ const Footer = ({ logo, copyright, children, ...props }: FooterProps) => {
8085 >
8186 < Grid container >
8287 < Grid
83- size = { { xs : 6 , md : 8 } }
88+ size = { logo || copyright ? { xs : 6 , md : 8 } : { xs : 12 , md : 12 } }
8489 style = { {
8590 alignContent : "center" ,
8691 } }
8792 >
88- { children }
89- </ Grid >
90- < Grid size = { { xs : 6 , md : 4 } } >
9193 < div
9294 style = { {
93- float : "right" ,
9495 paddingTop : "10px" ,
95- paddingRight : "15px" ,
96- textAlign : "right" ,
96+ paddingLeft : "15px" ,
9797 } }
9898 >
99- { logo && < ImageColorSchemeSwitch image = { logo } /> }
100- { copyright ? (
101- < Typography
102- style = { {
103- margin : 0 ,
104- color : theme . palette . primary . contrastText ,
105- } }
106- >
107- { `Copyright © ${ new Date ( ) . getFullYear ( ) } ${ copyright } ` }
108- </ Typography >
109- ) : null }
99+ { children }
110100 </ div >
111101 </ Grid >
102+
103+ { ( logo || copyright ) && (
104+ < Grid size = { { xs : 6 , md : 4 } } >
105+ < div
106+ style = { {
107+ float : "right" ,
108+ paddingTop : "10px" ,
109+ paddingRight : "15px" ,
110+ textAlign : "right" ,
111+ } }
112+ >
113+ { logo && < ImageColorSchemeSwitch image = { logo } /> }
114+ { copyright && (
115+ < Typography
116+ style = { {
117+ margin : "0 0 10px 0" ,
118+ color : theme . palette . primary . contrastText ,
119+ } }
120+ >
121+ { `Copyright © ${ new Date ( ) . getFullYear ( ) } ${ copyright } ` }
122+ </ Typography >
123+ ) }
124+ </ div >
125+ </ Grid >
126+ ) }
112127 </ Grid >
113128 </ footer >
114129 ) ;
0 commit comments