1- import React from 'react ' ;
1+ import { Box , Card , CardContent , Typography } from '@material-ui/core ' ;
22import { makeStyles } from '@material-ui/core/styles' ;
33import ParallaxSlide from '@mui-treasury/components/slide/parallax' ;
4-
5- import {
6- Typography ,
7- Box ,
8- Card ,
9- CardContent ,
10- Container
11- } from '@material-ui/core' ;
4+ import React from 'react' ;
125import { Link } from 'react-router-dom' ;
136
147const useStyles = makeStyles ( theme => ( {
@@ -41,7 +34,9 @@ const useStyles = makeStyles(theme => ({
4134 height : 'auto'
4235 // paddingTop: "56.25%", // 16:9
4336 } ,
44- cardContent : { } ,
37+ cardContent : {
38+ padding : '16px 0px 16px 16px'
39+ } ,
4540 chipActions : {
4641 display : 'block'
4742 } ,
@@ -99,6 +94,14 @@ const useStyles = makeStyles(theme => ({
9994 width : '100%' ,
10095 // Promote the list into his own layer on Chrome. This cost memory but helps keeping high FPS.
10196 transform : 'translateZ(0)'
97+ } ,
98+ bottomCardContent : {
99+ margin : '0px 8px 18px 0px' ,
100+ padding : '4px 8px' ,
101+ border : '1px solid' ,
102+ borderColor : '#A6A6A6' ,
103+ borderRadius : '5px' ,
104+ width : 'min-content'
102105 }
103106} ) ) ;
104107
@@ -113,7 +116,7 @@ export default function CourseCard({ course }) {
113116 maxWidth : '320px'
114117 } }
115118 >
116- < CardContent className = { classes . cardContent } >
119+ < CardContent >
117120 < Box display = "flex" flexDirection = "column" >
118121 < Typography
119122 align = "left"
@@ -145,26 +148,24 @@ export default function CourseCard({ course }) {
145148 < ParallaxCarousel slides = { course . slides } />
146149
147150 < CardContent className = { classes . cardContent } >
148- < Box mt = { 0 } display = "flex" flexDirection = "row" >
151+ < Box
152+ mt = { 0 }
153+ mr = { 0 }
154+ display = "flex"
155+ flexDirection = "row"
156+ flexWrap = "wrap"
157+ style = { { width : '102%' } }
158+ >
149159 { course . tags . slice ( 0 , 3 ) . map ( ( tag , index ) => (
150- < Container
151- style = { {
152- margin : '0px 8px 18px 0px' ,
153- padding : '4px 8px' ,
154- border : '1px solid' ,
155- borderColor : '#A6A6A6' ,
156- borderRadius : '5px'
157- } }
158- variant = "outlined"
159- >
160+ < div className = { classes . bottomCardContent } variant = "outlined" >
160161 < Typography
161162 style = { { color : '#a6a6a6' , fontWeight : 500 } }
162163 variant = "caption"
163164 noWrap = { true }
164165 >
165166 { tag }
166167 </ Typography >
167- </ Container >
168+ </ div >
168169 ) ) }
169170 </ Box >
170171
0 commit comments