From cae4df261e964fb8f8836eb32b2001784c916a38 Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:43:07 -0600 Subject: [PATCH] Update rule card --- .../cards/RuleCard/RuleCard.view.tsx | 26 +++++++++++++------ .../TemplateReviewCard/TemplateReviewCard.tsx | 6 ++++- .../CreateFlowLockupCardStepShell.tsx | 4 +-- app/create/final-review/page.tsx | 4 ++- app/create/review-template/[slug]/page.tsx | 3 +++ app/create/review/page.tsx | 4 ++- 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/app/components/cards/RuleCard/RuleCard.view.tsx b/app/components/cards/RuleCard/RuleCard.view.tsx index a00b5db..c58c3a9 100644 --- a/app/components/cards/RuleCard/RuleCard.view.tsx +++ b/app/components/cards/RuleCard/RuleCard.view.tsx @@ -39,13 +39,19 @@ export function RuleCardView({ className?.includes("pb-["); const hasResponsiveGap = className?.includes("gap-["); - const cardPadding = hasResponsivePadding - ? "" // If className has responsive padding, don't add size-based padding - : isLarge || isSmall - ? "p-[24px]" - : isMedium - ? "p-[16px]" - : "pb-[24px] pt-[12px] px-[12px]"; // XS: asymmetric padding + // Expanded + size: uniform padding on all sides (overrides conflicting utilities from `className`). + const cardPadding = + expanded && isLarge + ? "!p-[24px]" + : expanded && isMedium + ? "!p-[16px]" + : hasResponsivePadding + ? "" + : isLarge || isSmall + ? "p-[24px]" + : isMedium + ? "p-[16px]" + : "pb-[24px] pt-[12px] px-[12px]"; // XS: asymmetric padding const cardGap = expanded ? "gap-[16px]" : hasResponsiveGap @@ -245,7 +251,11 @@ export function RuleCardView({ <> {/* Categories Section - Using MultiSelect */} {categories && categories.length > 0 && ( -
+
{categories.map((category, categoryIndex) => ( ; @@ -26,6 +27,7 @@ interface PageProps { export default function ReviewTemplatePage({ params }: PageProps) { const { slug: rawSlug } = use(params); const slug = decodeURIComponent(rawSlug); + const mdUp = useCreateFlowMdUp(); const t = useTranslation("create.templateReview"); const [template, setTemplate] = useState(null); @@ -94,6 +96,7 @@ export default function ReviewTemplatePage({ params }: PageProps) { ); diff --git a/app/create/review/page.tsx b/app/create/review/page.tsx index 2ed87e7..6d704da 100644 --- a/app/create/review/page.tsx +++ b/app/create/review/page.tsx @@ -3,10 +3,12 @@ import RuleCard from "../../components/cards/RuleCard"; import { useTranslation } from "../../contexts/MessagesContext"; import { CreateFlowHeaderLockup } from "../components/CreateFlowHeaderLockup"; +import { useCreateFlowMdUp } from "../hooks/useCreateFlowMdUp"; import { CreateFlowStepShell } from "../components/CreateFlowStepShell"; /** Mid-flow review step (after upload, before cards). */ export default function ReviewPage() { + const mdUp = useCreateFlowMdUp(); const t = useTranslation("create.review"); return ( @@ -26,7 +28,7 @@ export default function ReviewPage() {