Skip to content

Commit

Permalink
Remove responsive Card bevel (#11727)
Browse files Browse the repository at this point in the history
### WHY are these changes introduced?

Removing the responsive bevel logic until we are ready to rollout bevel
changes across all components.

### WHAT is this pull request doing?

Reverts bevel changes from #11566

Bevel will now be applied on the Card even on mobile screen sizes.

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

### 🎩 checklist

- [ ] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
  • Loading branch information
sam-b-rose authored Mar 13, 2024
1 parent dbca793 commit c3ba6ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-dolls-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': minor
---

Removed the responsive logic that disabled the Card bevel on mobile. Removing this until we are ready to rollout bevel changes across all components.
2 changes: 0 additions & 2 deletions polaris-react/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ export const Card = ({
}: CardProps) => {
const breakpoints = useBreakpoints();
const defaultBorderRadius: BorderRadiusAliasOrScale = '300';
const isSmUp = Boolean(breakpoints.smUp);
const hasBorderRadius = Boolean(breakpoints[`${roundedAbove}Up`]);

return (
<WithinContentContext.Provider value>
<ShadowBevel
bevel={isSmUp}
boxShadow="100"
borderRadius={hasBorderRadius ? defaultBorderRadius : '0'}
zIndex="32"
Expand Down

0 comments on commit c3ba6ae

Please sign in to comment.