Skip to content

Commit

Permalink
increased column in 4k display
Browse files Browse the repository at this point in the history
  • Loading branch information
i0am0arunava committed Nov 7, 2024
1 parent a5cc300 commit b17bfa5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/Facility/CentralNursingStation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ interface Props {
export default function CentralNursingStation({ facilityId }: Props) {
const breakpointValues = {
default: 6,
fourK: 9,
largedisplay: 9,
fourK: 10,
};
const PER_PAGE_LIMIT = useBreakpoints(breakpointValues);
const { t } = useTranslation();
Expand Down Expand Up @@ -218,7 +219,7 @@ export default function CentralNursingStation({ facilityId }: Props) {
{t("no_vitals_present")}
</div>
) : (
<div className="mt-1 grid grid-cols-1 gap-1 lg:grid-cols-2 fourK:grid-cols-3">
<div className="mt-1 grid grid-cols-1 gap-1 lg:grid-cols-2 largedisplay:grid-cols-3 fourk:grid-cols-4">
{data.map((props, i) => (
<div className="overflow-hidden text-clip" key={i}>
<HL7PatientVitalsMonitor
Expand Down
11 changes: 10 additions & 1 deletion src/hooks/useBreakpoints.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import useWindowDimensions from "@/hooks/useWindowDimensions";

type Breakpoints = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "fourK";
type Breakpoints =
| "sm"
| "md"
| "lg"
| "xl"
| "2xl"
| "3xl"
| "fourK"
| "largedisplay";

// Ensure that the breakpoint widths are sorted in ascending order.
const BREAKPOINT_WIDTH: Record<Breakpoints, number> = {
Expand All @@ -11,6 +19,7 @@ const BREAKPOINT_WIDTH: Record<Breakpoints, number> = {
"2xl": 1536,
"3xl": 1920,
fourK: 2080,
largedisplay: 2800,
};

/**
Expand Down
3 changes: 2 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ module.exports = {
theme: {
extend: {
screens: {
fourK: "130rem", // rem is used insted of pixel
largedisplay: "130rem",
fourk: "175rem", // rem is used insted of pixel
},
fontFamily: {
sans: ["Figtree", "sans-serif"],
Expand Down

0 comments on commit b17bfa5

Please sign in to comment.