Skip to content

Commit

Permalink
added divider prop for Row, added story
Browse files Browse the repository at this point in the history
added story with nested rows

added website example, added new story

renamed divider to the borderless, updated stories, code example

updated patch description

updated website example

refactored styles to use transparent token

applied same bg color for border color instead of making it transparent

moved back to border 0
  • Loading branch information
oksanashopify committed Mar 15, 2024
1 parent 042b428 commit 2a0ba1d
Show file tree
Hide file tree
Showing 6 changed files with 930 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .changeset/purple-olives-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/polaris': patch
'polaris.shopify.com': patch
---

Added `borderless` property to the `Row` component to determine whether the row should have visible `border-top`
17 changes: 17 additions & 0 deletions polaris-react/src/components/IndexTable/IndexTable.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ $loading-panel-height: 53px;
cursor: auto;
}

&.TableRow-borderless {
border: 0;
}

&.toneSuccess {
// stylelint-disable-next-line selector-max-combinators, selector-max-class, selector-max-specificity -- generated by polaris-migrator DO NOT COPY
&,
Expand Down Expand Up @@ -264,6 +268,19 @@ $loading-panel-height: 53px;
border-bottom: var(--p-border-width-025) solid var(--p-color-border);
border-color: var(--p-color-border);
}

// stylelint-disable-next-line selector-max-class -- makes subheader borders not visible
&.TableRow-borderless {
border: 0;
// stylelint-disable-next-line selector-max-combinators, selector-max-class, selector-max-specificity -- makes subheader borders not visible
&,
.TableCell:first-child,
.TableCell-first,
.TableCell-first + .TableCell,
.TableCell:last-child {
border: 0;
}
}
}

&.TableRow-child {
Expand Down
Loading

0 comments on commit 2a0ba1d

Please sign in to comment.