@@ -86,10 +86,11 @@ export interface AbstractListViewItemProps {
86
86
87
87
export const AbstractListViewItem = ( { icon, title, subject, subtitle, breadcrumb, status, tags, testTag, url, audienceViews, previewUrl, testUrl, isCard} : AbstractListViewItemProps ) => {
88
88
const isQuiz : boolean = ( previewUrl && testUrl ) ? true : false ;
89
- const colWidths = isCard ? [ 12 , 12 , 12 , 12 ] : isQuiz ? [ 12 , 6 , 6 , 6 ] : [ 12 , 8 , 9 , 8 ] ;
89
+ const fullWidth : boolean = ( status || audienceViews || previewUrl || testUrl ) ? false : true ;
90
+ const colWidths = fullWidth ? [ 12 , 12 , 12 , 12 , 12 ] : isQuiz ? [ 12 , 6 , 6 , 6 , 6 ] : [ 12 , 8 , 7 , 6 , 7 ] ;
90
91
const cardBody =
91
- < Row className = "w-100" >
92
- < Col xs = { colWidths [ 0 ] } md = { colWidths [ 1 ] } lg = { colWidths [ 2 ] } xl = { colWidths [ 3 ] } className = { classNames ( "d-flex" , { "mt-3" : isCard } ) } >
92
+ < Row className = "w-100 flex-row " >
93
+ < Col xs = { colWidths [ 0 ] } md = { colWidths [ 1 ] } lg = { colWidths [ 2 ] } xl = { colWidths [ 3 ] } xxl = { colWidths [ 4 ] } className = { classNames ( "d-flex" , { "mt-3" : isCard } ) } >
93
94
< div >
94
95
{ icon && (
95
96
icon . type === "img" ? < img src = { icon . icon } alt = "" className = "me-3" />
@@ -107,7 +108,7 @@ export const AbstractListViewItem = ({icon, title, subject, subtitle, breadcrumb
107
108
< Breadcrumb breadcrumb = { breadcrumb } />
108
109
</ div > }
109
110
{ audienceViews && < div className = "d-flex d-md-none" >
110
- < StageAndDifficultySummaryIcons audienceViews = { audienceViews } stack = { true } />
111
+ < StageAndDifficultySummaryIcons audienceViews = { audienceViews } stack />
111
112
</ div > }
112
113
{ status && < div className = "d-flex d-xl-none" >
113
114
< StatusDisplay status = { status } />
@@ -120,11 +121,11 @@ export const AbstractListViewItem = ({icon, title, subject, subtitle, breadcrumb
120
121
</ div > }
121
122
</ div >
122
123
</ Col >
123
- { ! isQuiz && ( audienceViews || status ) && < Col xl = { 2 } className = { classNames ( "d-none d-xl-flex" , { " list-view-border" : ( status && status !== CompletionState . NOT_ATTEMPTED ) } ) } >
124
+ { ! isQuiz && ( audienceViews || status ) && < Col xl = { 2 } className = { classNames ( "d-none d-xl-flex" , { "list-view-border" : ( status && status !== CompletionState . NOT_ATTEMPTED ) } ) } >
124
125
< StatusDisplay status = { status ?? CompletionState . NOT_ATTEMPTED } />
125
126
</ Col > }
126
- { audienceViews && < Col md = { 4 } lg = { 3 } xl = { 2 } className = { classNames ( "d-none d-md-flex" , { " list-view-border" : audienceViews . length > 0 } ) } >
127
- < StageAndDifficultySummaryIcons audienceViews = { audienceViews } stack = { true } />
127
+ { audienceViews && < Col md = { 4 } lg = { 5 } xl = { 4 } xxl = { 3 } className = "d-none d-md-flex justify-content-end" >
128
+ < StageAndDifficultySummaryIcons audienceViews = { audienceViews } stack spacerWidth = { 5 } className = { classNames ( { "list-view-border" : audienceViews . length > 0 } ) } />
128
129
</ Col > }
129
130
{ previewUrl && testUrl && < Col md = { 6 } className = "d-none d-md-flex align-items-center justify-content-end" >
130
131
< QuizLinks previewUrl = { previewUrl } testUrl = { testUrl } />
0 commit comments