File tree Expand file tree Collapse file tree 2 files changed +16
-29
lines changed
src/components/home/partners Expand file tree Collapse file tree 2 files changed +16
-29
lines changed Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
2
3
+ import Image from '../../image' ;
4
+
3
5
import { withStyles } from '@material-ui/core/styles' ;
4
6
import Grid from '@material-ui/core/Grid' ;
5
7
@@ -11,16 +13,24 @@ const styles = theme => ({
11
13
position : 'relative' ,
12
14
width : '100%' ,
13
15
} ,
16
+ logoImage : {
17
+ maxHeight : '100%' ,
18
+ '& img' : {
19
+ objectFit : 'contain !important' ,
20
+ } ,
21
+ } ,
14
22
} ) ;
15
23
16
24
class LogoComponent extends Component {
17
25
render ( ) {
18
- const { Logo } = this . props ;
26
+ const { filename } = this . props ;
19
27
const { classes } = this . props ;
20
28
21
29
return (
22
30
< Grid item xs = { 5 } sm = { 5 } className = { classes . root } >
23
- < div className = { classes . logo } > { Logo } </ div >
31
+ < div className = { classes . logo } >
32
+ < Image filename = { filename } classProps = { classes . logoImage } />
33
+ </ div >
24
34
</ Grid >
25
35
) ;
26
36
}
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
- import Image from '../../image' ;
3
2
4
3
import LogoComponent from './LogoComponent' ;
5
4
@@ -23,12 +22,6 @@ const styles = theme => ({
23
22
lineHeight : 1.5 ,
24
23
} ,
25
24
} ,
26
- logoImage : {
27
- maxHeight : '100%' ,
28
- '& img' : {
29
- objectFit : 'contain !important' ,
30
- } ,
31
- } ,
32
25
} ) ;
33
26
34
27
class PartnersComponent extends Component {
@@ -41,26 +34,10 @@ class PartnersComponent extends Component {
41
34
Awesome Partners
42
35
</ Typography >
43
36
< Grid container justify = "space-around" >
44
- < LogoComponent
45
- Logo = {
46
- < Image filename = { 'google.png' } classProps = { classes . logoImage } />
47
- }
48
- />
49
- < LogoComponent
50
- Logo = {
51
- < Image filename = { 'google.png' } classProps = { classes . logoImage } />
52
- }
53
- />
54
- < LogoComponent
55
- Logo = {
56
- < Image filename = { 'google.png' } classProps = { classes . logoImage } />
57
- }
58
- />
59
- < LogoComponent
60
- Logo = {
61
- < Image filename = { 'google.png' } classProps = { classes . logoImage } />
62
- }
63
- />
37
+ < LogoComponent filename = { 'google.png' } />
38
+ < LogoComponent filename = { 'google.png' } />
39
+ < LogoComponent filename = { 'google.png' } />
40
+ < LogoComponent filename = { 'google.png' } />
64
41
</ Grid >
65
42
</ div >
66
43
) ;
You can’t perform that action at this time.
0 commit comments