Skip to content

Commit

Permalink
Added tooltip on occupancy chip in facility card (#5539)
Browse files Browse the repository at this point in the history
* Added tooltip on occupancy chip

* nihal said to make it placed right, so... here it is

* fix clipping in mobile

---------

Co-authored-by: Rithvik Nishad <[email protected]>
  • Loading branch information
Bhavik-ag and rithviknishad authored May 26, 2023
1 parent 9999d3b commit a0894c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Components/Facility/FacilityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {

return (
<div key={`usr_${facility.id}`} className="w-full">
<div className="block rounded-lg h-full overflow-clip bg-white shadow hover:border-primary-500">
<div className="block rounded-lg h-full bg-white shadow hover:border-primary-500">
<div className="flex h-full">
<Link
href={`/facility/${facility.id}`}
Expand Down Expand Up @@ -158,13 +158,15 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
<div className="flex justify-between w-full flex-wrap gap-2">
<div className="flex gap-2">
<div
className={`flex items-center justify-center rounded-md text-xl h-[38px] w-fit px-2 ml-auto ${
className={`flex items-center tooltip justify-center rounded-md text-xl h-[38px] w-fit px-2 ml-auto ${
facility.patient_count / facility.bed_count > 0.85
? "bg-red-500 button-danger-border"
: "bg-primary-100 button-primary-border"
}`}
>
{" "}
<span className="tooltip-text tooltip-right -translate-y-2">
Live Patients / Total beds
</span>{" "}
<CareIcon
className={`care-l-bed text-${
facility.patient_count / facility.bed_count > 0.85
Expand Down

0 comments on commit a0894c5

Please sign in to comment.