From af4433ce70759c82d1af4ca7c692549a9aa0fea4 Mon Sep 17 00:00:00 2001 From: Simon Ward Date: Thu, 31 Oct 2024 10:45:27 +0000 Subject: [PATCH] Revert "CAPY[909] Remove min width & height on BpkDividedCard (#3658)" (#3659) This reverts commit 5678801300e1f46d759fa6c78e155582953ea820. --- examples/bpk-component-card/examples.js | 28 +++++++++++-------- .../src/BpkDividedCard.module.scss | 12 ++++++++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/examples/bpk-component-card/examples.js b/examples/bpk-component-card/examples.js index fc3c446ef6..36ee1ccabc 100644 --- a/examples/bpk-component-card/examples.js +++ b/examples/bpk-component-card/examples.js @@ -110,11 +110,14 @@ const DefaultDividedCardExample = () => ( ); const VerticalDividedCardExample = () => ( - + +
+ +
); const WithHrefDividedCardExample = () => ( ( ); const NonElevatedDividedCardExample = () => ( - + +
+ +
); const CardWrapperExample = () => ( diff --git a/packages/bpk-component-card/src/BpkDividedCard.module.scss b/packages/bpk-component-card/src/BpkDividedCard.module.scss index f88dd39bdb..93beaaa2b9 100644 --- a/packages/bpk-component-card/src/BpkDividedCard.module.scss +++ b/packages/bpk-component-card/src/BpkDividedCard.module.scss @@ -19,9 +19,16 @@ @use '../../unstable__bpk-mixins/tokens'; @use '../../unstable__bpk-mixins/utils'; +$min-vertical-width: 240; +$max-vertical-width: 720; +$min-horizontal-width: $max-vertical-width + 1; +$min-horizontal-height: 292; +$fixed-secondary-width: 216; + .bpk-divided-card { &--content { display: flex; + height: 100%; align-items: stretch; } @@ -31,10 +38,14 @@ &--vertical-container { display: flex; + min-width: tokens.$bpk-one-pixel-rem * $min-vertical-width; + max-width: tokens.$bpk-one-pixel-rem * $max-vertical-width; } &--horizontal-container { display: flex; + min-width: tokens.$bpk-one-pixel-rem * $min-horizontal-width; + min-height: tokens.$bpk-one-pixel-rem * $min-horizontal-height; } &__primary { @@ -49,6 +60,7 @@ } &--horizontal { + width: tokens.$bpk-one-pixel-rem * $fixed-secondary-width; border-left: tokens.$bpk-input-border; @include utils.bpk-rtl {