From 8f927f7622d15554c1ec3c02cdb1b381be636655 Mon Sep 17 00:00:00 2001 From: Kyle Durand Date: Thu, 17 Aug 2023 08:03:08 -0400 Subject: [PATCH] Add variant prop to Layout.Section (#10041) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### WHY are these changes introduced? Fixes https://github.com/Shopify/polaris/issues/9982 ### WHAT is this pull request doing? Replaces boolean props on Layout.Section and replaces them with `variant` prop ### How to 🎩 --- .changeset/silly-ligers-heal.md | 5 +++++ polaris-react/playground/DetailsPage.tsx | 2 +- .../src/components/Layout/Layout.scss | 5 ----- .../src/components/Layout/Layout.stories.tsx | 12 +++++------ .../Layout/components/Section/Section.tsx | 21 +++---------------- .../SkeletonPage/SkeletonPage.stories.tsx | 10 ++++----- .../layout-annotated-with-sections.tsx | 2 +- .../layout-three-columns-with-equal-width.tsx | 6 +++--- .../layout-two-columns-with-equal-width.tsx | 4 ++-- ...umns-with-primary-and-secondary-widths.tsx | 2 +- .../skeleton-page-with-dynamic-content.tsx | 2 +- .../skeleton-page-with-static-content.tsx | 9 ++++++-- 12 files changed, 35 insertions(+), 45 deletions(-) create mode 100644 .changeset/silly-ligers-heal.md diff --git a/.changeset/silly-ligers-heal.md b/.changeset/silly-ligers-heal.md new file mode 100644 index 00000000000..0436fd5230d --- /dev/null +++ b/.changeset/silly-ligers-heal.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': major +--- + +Replaced boolean props: `secondary`, `fullWidth`, `oneHalf`, `oneThird` on Layout.Section with `variant` diff --git a/polaris-react/playground/DetailsPage.tsx b/polaris-react/playground/DetailsPage.tsx index 46f54b024b4..2d90fa76db3 100644 --- a/polaris-react/playground/DetailsPage.tsx +++ b/polaris-react/playground/DetailsPage.tsx @@ -625,7 +625,7 @@ export function DetailsPage() { - +