@@ -38,8 +38,8 @@ import {
3838 ToolbarItem ,
3939 Tooltip
4040} from '@patternfly/react-core' ;
41- import { Button , Card , Modal , Th , Td , Thead , Tbody } from 'semantic-ui-layer' ;
42- import { AngleDownIcon , AngleRightIcon , BuildIcon , CheckCircleIcon , CodeBranchIcon , CopyIcon , EditIcon , EllipsisVIcon , ExclamationCircleIcon , ExclamationTriangleIcon , ExternalLinkAltIcon , FilterIcon , OutlinedQuestionCircleIcon , OutlinedStarIcon , PlayIcon , StarIcon , TimesIcon } from '@patternfly/react-icons' ;
41+ import { Button , Card , Modal , Th , Td , Thead , Tbody , Checkbox , Link , StatusBadge , StarIcon } from 'semantic-ui-layer' ;
42+ import { AngleDownIcon , AngleRightIcon , BuildIcon , CheckCircleIcon , CodeBranchIcon , CopyIcon , EditIcon , EllipsisVIcon , ExclamationCircleIcon , ExclamationTriangleIcon , ExternalLinkAltIcon , FilterIcon , OutlinedQuestionCircleIcon , OutlinedStarIcon , PlayIcon , StarIcon as PFStarIcon , TimesIcon } from '@patternfly/react-icons' ;
4343import { type ImageItem , UseBaseImageModal } from './UseBaseImageModal' ;
4444import BuildImageModal from './BuildImageModal' ;
4545import { ImportPipelineModal } from './ImportPipelineModal' ;
@@ -1024,7 +1024,7 @@ const Test: React.FunctionComponent = () => {
10241024 } }
10251025 isDisabled = { selectedRows . size !== 1 || hasNonReadySelected }
10261026 >
1027- Edit
1027+ Button
10281028 </ Button >
10291029 </ ToolbarItem >
10301030
@@ -1035,7 +1035,7 @@ const Test: React.FunctionComponent = () => {
10351035 onClick = { handleBulkDuplicate }
10361036 isDisabled = { selectedRows . size === 0 || hasNonReadySelected }
10371037 >
1038- Duplicate ( { selectedRows . size } )
1038+ Button
10391039 </ Button >
10401040 </ ToolbarItem >
10411041 < ToolbarItem >
@@ -1045,7 +1045,7 @@ const Test: React.FunctionComponent = () => {
10451045 onClick = { handleBulkRebuild }
10461046 isDisabled = { selectedRows . size === 0 }
10471047 >
1048- Rebuild ( { selectedRows . size } )
1048+ Button
10491049 </ Button >
10501050 </ ToolbarItem >
10511051 </ >
@@ -1072,23 +1072,23 @@ const Test: React.FunctionComponent = () => {
10721072 } } >
10731073 < tr >
10741074 < th style = { { padding : '1rem 0.5rem 1rem 1.5rem' , textAlign : 'left' , fontWeight : 600 , width : '40px' } } > </ th >
1075- < Th
1076- semanticName = "Select All Images"
1077- style = { { padding : '1rem 0.75rem 1rem 1.5rem' , textAlign : 'left' , fontWeight : 600 , width : '40px' } }
1078- >
1079- < input
1080- type = " checkbox"
1081- checked = { selectedRows . size === paginatedImages . length && paginatedImages . length > 0 }
1082- onChange = { ( e ) => {
1083- if ( e . target . checked ) {
1084- setSelectedRows ( new Set ( paginatedImages . map ( img => img . id ) ) ) ;
1085- } else {
1086- setSelectedRows ( new Set ( ) ) ;
1087- }
1088- } }
1089- style = { { cursor : 'pointer' } }
1090- />
1091- </ Th >
1075+ < Th
1076+ semanticName = "Select All Images"
1077+ style = { { padding : '1rem 0.75rem 1rem 1.5rem' , textAlign : 'left' , fontWeight : 600 , width : '40px' } }
1078+ >
1079+ < Checkbox
1080+ id = "select-all- checkbox"
1081+ checked = { selectedRows . size === paginatedImages . length && paginatedImages . length > 0 }
1082+ onChange = { ( e ) => {
1083+ if ( e . target . checked ) {
1084+ setSelectedRows ( new Set ( paginatedImages . map ( img => img . id ) ) ) ;
1085+ } else {
1086+ setSelectedRows ( new Set ( ) ) ;
1087+ }
1088+ } }
1089+ style = { { cursor : 'pointer' } }
1090+ />
1091+ </ Th >
10921092 < th style = { { padding : '1rem 0.5rem' } } >
10931093 </ th >
10941094 < Th
@@ -1190,26 +1190,26 @@ const Test: React.FunctionComponent = () => {
11901190 </ Button >
11911191 </ td >
11921192 < td style = { { padding : '1rem 0.75rem 1rem 1.5rem' } } onClick = { ( e ) => e . stopPropagation ( ) } >
1193- < input
1194- type = " checkbox"
1193+ < Checkbox
1194+ id = { ` checkbox- ${ image . id } ` }
11951195 checked = { selectedRows . has ( image . id ) }
11961196 onChange = { ( ) => toggleRowSelection ( image . id ) }
11971197 style = { { cursor : 'pointer' } }
11981198 />
11991199 </ td >
12001200 < td style = { { padding : '1rem 0.5rem' } } onClick = { ( e ) => e . stopPropagation ( ) } >
1201- < Button
1202- variant = "plain"
1201+ < StarIcon
12031202 onClick = { ( ) => toggleFavorite ( image . id ) }
12041203 aria-label = { `${ image . isFavorited ? 'Remove from' : 'Add to' } favorites` }
12051204 style = { { padding : '0.25rem' } }
1205+ isFavorited = { image . isFavorited }
12061206 >
12071207 { image . isFavorited ? (
1208- < StarIcon style = { { color : '#f39c12' } } />
1208+ < PFStarIcon style = { { color : '#f39c12' } } />
12091209 ) : (
12101210 < OutlinedStarIcon style = { { color : '#666' } } />
12111211 ) }
1212- </ Button >
1212+ </ StarIcon >
12131213 </ td >
12141214 < td style = { { padding : '1rem 1.5rem' } } >
12151215 < strong > { image . name } </ strong >
@@ -1220,10 +1220,14 @@ const Test: React.FunctionComponent = () => {
12201220 < td style = { { padding : '1rem 1.5rem' } } > { image . currentRelease } </ td >
12211221 < td style = { { padding : '1rem 1.5rem' } } > { image . targetEnvironment } </ td >
12221222
1223- < td style = { { padding : '1rem 1.5rem' } } > { getStatusBadge ( image . status , image . targetEnvironment ) } </ td >
1223+ < td style = { { padding : '1rem 1.5rem' } } >
1224+ < StatusBadge >
1225+ { getStatusBadge ( image . status , image . targetEnvironment ) }
1226+ </ StatusBadge >
1227+ </ td >
12241228 < td style = { { padding : '1rem 1.5rem' } } >
12251229 { image . status === 'ready' ? (
1226- < a
1230+ < Link
12271231 href = "#"
12281232 onClick = { ( e ) => {
12291233 e . preventDefault ( ) ;
@@ -1240,9 +1244,9 @@ const Test: React.FunctionComponent = () => {
12401244 onMouseOut = { ( e ) => e . currentTarget . style . textDecoration = 'none' }
12411245 >
12421246 Launch instance
1243- </ a >
1247+ </ Link >
12441248 ) : (
1245- < a
1249+ < Link
12461250 href = "#"
12471251 onClick = { ( e ) => {
12481252 e . preventDefault ( ) ;
@@ -1260,7 +1264,7 @@ const Test: React.FunctionComponent = () => {
12601264 onMouseOut = { ( e ) => e . currentTarget . style . textDecoration = 'none' }
12611265 >
12621266 Download blueprint (.json)
1263- </ a >
1267+ </ Link >
12641268 ) }
12651269 </ td >
12661270 < td style = { { padding : '1rem 1.5rem' } } onClick = { ( e ) => e . stopPropagation ( ) } >
@@ -1494,10 +1498,10 @@ const Test: React.FunctionComponent = () => {
14941498 marginRight : '-8px' // Align with X button position
14951499 } } >
14961500 < Button variant = "danger" onClick = { handleDeleteConfirm } >
1497- Delete
1501+ Button
14981502 </ Button >
14991503 < Button variant = "link" onClick = { handleDeleteCancel } >
1500- Cancel
1504+ Button
15011505 </ Button >
15021506 </ div >
15031507 </ ModalBody >
@@ -1531,7 +1535,7 @@ const Test: React.FunctionComponent = () => {
15311535 padding : '0.25rem 0.5rem'
15321536 } }
15331537 >
1534- Watch Demo
1538+ Button
15351539 </ Button >
15361540 </ FlexItem >
15371541 < FlexItem >
0 commit comments