From 795b37d67db6aa1c67ddffba9ef62a56d1e4abf0 Mon Sep 17 00:00:00 2001 From: gmolki Date: Thu, 14 Nov 2024 11:40:43 +0100 Subject: [PATCH] feat: add props to CardWithSideImage * cardOccupation * spaceBetween --- .../CardWithSideImage/cmp.builder.tsx | 52 +++++-------------- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/src/components/CardWithSideImage/cmp.builder.tsx b/src/components/CardWithSideImage/cmp.builder.tsx index 8daee88..598e048 100644 --- a/src/components/CardWithSideImage/cmp.builder.tsx +++ b/src/components/CardWithSideImage/cmp.builder.tsx @@ -4,46 +4,9 @@ import { ALIGN_ITEMS_VALUES, BACKGROUND_COLORS, JUSTIFY_CONTENT_VALUES, + REM_VALUES, } from "@/constants/builderEnums"; import { CardWithSideImage } from "@aleph-front/core"; -type AlignProps = - | "normal" - | "stretch" - | "center" - | "start" - | "end" - | "flex-start" - | "flex-end" - | "baseline" - | "first baseline" - | "last baseline" - | "safe center" - | "unsafe center" - | "inherit" - | "initial" - | "revert" - | "revert-layer" - | "unset"; -type JustifyProps = - | "normal" - | "center" - | "start" - | "end" - | "flex-start" - | "flex-end" - | "left" - | "right" - | "space-between" - | "space-around" - | "space-evenly" - | "stretch" - | "safe center" - | "unsafe center" - | "inherit" - | "initial" - | "revert" - | "revert-layer" - | "unset"; Builder.registerComponent(withChildren(CardWithSideImage), { ...DEFAULT_PROPS, @@ -108,5 +71,18 @@ Builder.registerComponent(withChildren(CardWithSideImage), { helperText: "When stacking columns for mobile devices, reverse the ordering", }, + { + name: "cardOccupation", + type: "number", + defaultValue: 5, + helperText: + "Set a number from 1 to 9 to define the width of the card in a 10 column grid", + }, + { + name: "spaceBetween", + friendlyName: "Space between Card and Image", + type: "string", + enum: REM_VALUES, + }, ], });