Skip to content

Commit

Permalink
Use Table.Body
Browse files Browse the repository at this point in the history
  • Loading branch information
eoye committed Dec 30, 2024
1 parent 0efabff commit fef0922
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions www/src/components/editor/CommissioningPackageDeletionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,33 @@ const DeleteCommissioningPackageDialog: React.FC<DeleteDialogProps> = ({ isOpen,
</Dialog.Header>
<Dialog.CustomContent>
Choose which commissioning packages to delete:
{context?.commissioningPackages.map((commpckg) => (
<Table key={commpckg.id}>
<Table.Row>
<Table.Cell>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div
style={{
width: '16px',
height: '16px',
backgroundColor: commpckg.color,
borderRadius: '50%',
marginRight: '8px',
}}
></div>
<Checkbox
label={commpckg.name}
name="multiple"
checked={selectedPackages.has(commpckg.id)}
onChange={() => handleCheckboxChange(commpckg.id)}
/>
</div>
</Table.Cell>
</Table.Row>
</Table>
))}
<Table>
<Table.Body>
{context?.commissioningPackages.map((commpckg) => (
<Table.Row key={commpckg.id}>
<Table.Cell>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div
style={{
width: '16px',
height: '16px',
backgroundColor: commpckg.color,
borderRadius: '50%',
marginRight: '8px',
}}
></div>
<Checkbox
label={commpckg.name}
name="multiple"
checked={selectedPackages.has(commpckg.id)}
onChange={() => handleCheckboxChange(commpckg.id)}
/>
</div>
</Table.Cell>
</Table.Row>
))}
</Table.Body>
</Table>
</Dialog.CustomContent>
<Dialog.Actions>
<Button onClick={handleDelete}>Delete</Button>
Expand Down

0 comments on commit fef0922

Please sign in to comment.