Skip to content

Commit a9eff60

Browse files
authored
[Box] Add support for section element type (#7491)
### WHY are these changes introduced? Our `Modal` component is being refactored to use our layout primitives and we need to support `section` as an element type. ### WHAT is this pull request doing? Adds `section` as accepted element type to the `as` prop for `Box`. Updates prop table in style guide with `get-props` script. ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) 🗒 [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 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 - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
1 parent 60191f3 commit a9eff60

File tree

3 files changed

+847
-839
lines changed

3 files changed

+847
-839
lines changed

.changeset/odd-zebras-yell.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/polaris': minor
3+
'polaris.shopify.com': minor
4+
---
5+
6+
Added support for `section` element types to `Box`

polaris-react/src/components/Box/Box.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {classNames, sanitizeCustomProperties} from '../../utilities/css';
88

99
import styles from './Box.scss';
1010

11-
type Element = 'div' | 'span';
11+
type Element = 'div' | 'span' | 'section';
1212

1313
type Overflow = 'hidden' | 'scroll';
1414

0 commit comments

Comments
 (0)