Skip to content

Commit

Permalink
fix discontinued button alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 13, 2023
1 parent 0a74227 commit 38a12f4
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions src/Components/Medicine/PrescriptionAdministrationsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,31 +252,25 @@ export default function PrescriptionAdministrationsTable({
/>
))}
</tbody>

{showDiscontinued === false && !!discontinuedCount && (
<tfoot>
<tr>
<td colSpan={100}>
<ButtonV2
variant="secondary"
className="w-full"
ghost
onClick={() => setShowDiscontinued(true)}
>
<span className="flex w-full justify-start gap-1 text-sm">
<CareIcon icon="l-eye" className="text-lg" />
<span>
Show <strong>{discontinuedCount}</strong> other
discontinued prescription(s)
</span>
</span>
</ButtonV2>
</td>
</tr>
</tfoot>
)}
</table>

{showDiscontinued === false && !!discontinuedCount && (
<ButtonV2
variant="secondary"
className="sticky left-0 z-10 w-full"
ghost
onClick={() => setShowDiscontinued(true)}
>
<span className="flex w-full justify-start gap-1 text-sm">
<CareIcon icon="l-eye" className="text-lg" />
<span>
Show <strong>{discontinuedCount}</strong> other discontinued
prescription(s)
</span>
</span>
</ButtonV2>
)}

{state?.prescriptions.length === 0 && (
<div className="my-16 flex w-full flex-col items-center justify-center gap-4 text-gray-500">
<CareIcon className="care-l-tablets text-5xl" />
Expand Down

0 comments on commit 38a12f4

Please sign in to comment.