@@ -67,12 +67,12 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
6767 const outerRadius = isMobile ? 55 : 68 ;
6868
6969 return (
70- < Box sx = { { flex : 1 , display : 'flex' , flexDirection : 'column' } } >
71- < Typography variant = "body2" fontWeight = { 500 } color = "text.secondary" gutterBottom sx = { { mb : { xs : 1 , sm : 2 } , fontSize : { xs : '0.875rem' , sm : '0.875rem' } } } >
70+ < Box sx = { { flex : 1 , display : 'flex' , flexDirection : 'column' , minWidth : 0 , maxWidth : '100%' } } >
71+ < Typography variant = "body2" fontWeight = { 500 } color = "text.secondary" gutterBottom sx = { { mb : { xs : 1 , sm : 2 } , fontSize : { xs : '0.875rem' , sm : '0.875rem' } , flexShrink : 0 } } >
7272 { title }
7373 </ Typography >
74- < Box sx = { { display : 'flex' , flexDirection : { xs : 'column' , sm : 'row' , lg : 'row' } , alignItems : 'center' , gap : { xs : 1.5 , sm : 2 , lg : 1.5 } } } >
75- < Box sx = { { position : 'relative' , height : { xs : 120 , sm : 150 , lg : 130 , xl : 150 } , width : { xs : 120 , sm : 150 , lg : 130 , xl : 150 } , flexShrink : 0 } } >
74+ < Box sx = { { display : 'flex' , flexDirection : { xs : 'column' , sm : 'row' , lg : 'row' } , alignItems : 'center' , gap : { xs : 1.5 , sm : 2 , lg : 1.5 } , width : '100%' , minWidth : 0 , flex : 1 } } >
75+ < Box sx = { { position : 'relative' , height : { xs : 120 , sm : 150 , lg : 130 , xl : 140 } , width : { xs : 120 , sm : 150 , lg : 130 , xl : 140 } , flexShrink : 0 } } >
7676 < ResponsiveContainer width = "100%" height = "100%" >
7777 < PieChart >
7878 < Pie
@@ -118,14 +118,14 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
118118 </Typography> */ }
119119 </ Box >
120120 </ Box >
121- < Stack spacing = { 1 } sx = { { flex : 1 } } >
121+ < Stack spacing = { 1 } sx = { { flex : 1 , minWidth : 0 } } >
122122 { data . map ( ( item , index ) => (
123123 < Stack
124124 key = { index }
125125 direction = "row"
126126 alignItems = "center"
127127 spacing = { 1 }
128- // sx={{ cursor: 'pointer' }}
128+ sx = { { minWidth : 0 } }
129129 >
130130 < Box
131131 sx = { {
@@ -139,10 +139,10 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
139139 < Typography
140140 variant = "body2"
141141 sx = { {
142- // textDecoration: 'underline',
143142 color : theme . palette . primary . main ,
144143 fontSize : { xs : '12px' , sm : '13px' , lg : '12px' , xl : '13px' } ,
145- // cursor: 'none',
144+ minWidth : 0 ,
145+ wordBreak : 'break-word'
146146 } }
147147 >
148148 { item . name } : { item . value }
@@ -155,11 +155,26 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
155155 ) ;
156156 } ;
157157 return (
158- < Paper elevation = { 0 } sx = { { p : { xs : 1.5 , sm : 2 } , border : '1px solid #E0E0E0' , borderRadius : 2 } } >
159- < Typography variant = "subtitle1" fontWeight = { 600 } gutterBottom sx = { { fontSize : { xs : '1rem' , sm : '1.125rem' } } } >
158+ < Paper elevation = { 0 } sx = { { p : { xs : 1.5 , sm : 2 } , border : '1px solid #E0E0E0' , borderRadius : 2 , height : '100%' , display : 'flex' , flexDirection : 'column' , overflowX : 'hidden' , overflowY : 'visible' } } >
159+ < Typography variant = "subtitle1" fontWeight = { 600 } gutterBottom sx = { { fontSize : { xs : '1rem' , sm : '1.125rem' } , flexShrink : 0 } } >
160160 Course Completion
161161 </ Typography >
162- < Stack direction = { { xs : 'column' , sm : 'column' , lg : 'row' , xl : 'row' } } spacing = { { xs : 2 , sm : 2 , lg : 2.5 , xl : 3 } } sx = { { mt : 2 } } >
162+ < Stack
163+ direction = { { xs : 'column' , sm : 'column' , lg : 'row' , xl : 'row' } }
164+ spacing = { { xs : 2 , sm : 2 , lg : 2 , xl : 2.5 } }
165+ sx = { {
166+ mt : 2 ,
167+ flex : 1 ,
168+ minHeight : 0 ,
169+ width : '100%' ,
170+ alignItems : { xs : 'stretch' , sm : 'stretch' , lg : 'flex-start' , xl : 'flex-start' } ,
171+ '& > *' : {
172+ flex : { lg : '1 1 auto' , xl : '1 1 auto' } ,
173+ minWidth : 0 ,
174+ maxWidth : { lg : 'calc(50% - 4px)' , xl : 'calc(50% - 5px)' }
175+ }
176+ } }
177+ >
163178 { renderDonutChart ( prepareMandatoryData ( ) , 'Mandatory Courses' ) }
164179 { renderDonutChart ( prepareNonMandatoryData ( ) , 'Non Mandatory Courses' ) }
165180 </ Stack >
0 commit comments