diff --git a/.changeset/quick-spies-grin.md b/.changeset/quick-spies-grin.md new file mode 100644 index 00000000000..719ae630fee --- /dev/null +++ b/.changeset/quick-spies-grin.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +Removed wrap children with div from Inline component diff --git a/polaris-react/src/components/Inline/Inline.stories.tsx b/polaris-react/src/components/Inline/Inline.stories.tsx index 1dc438533a2..fd56382c62e 100644 --- a/polaris-react/src/components/Inline/Inline.stories.tsx +++ b/polaris-react/src/components/Inline/Inline.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; import type {ComponentMeta} from '@storybook/react'; -import {Badge, Heading, Icon, Inline} from '@shopify/polaris'; -import {CapitalMajor} from '@shopify/polaris-icons'; +import {Box, Badge, Heading, Icon, Inline, Thumbnail} from '@shopify/polaris'; +import {CapitalMajor, ImageMajor} from '@shopify/polaris-icons'; export default { component: Inline, @@ -13,7 +13,9 @@ export function Default() { One Two Three - + + + ); } @@ -21,94 +23,94 @@ export function Default() { export function AlignYCenter() { return ( + One Two Three - ); } export function AlignYTop() { return ( - + + One Two Three - ); } export function AlignYBottom() { return ( - + + One Two Three - ); } export function AlignYBaseline() { return ( - + + One Two Three - ); } export function AlignStart() { return ( - + + One Two Three - ); } export function AlignCenter() { return ( - + + One Two Three - ); } export function AlignEnd() { return ( - + + One Two Three - ); } export function AlignCenterAlignYCenter() { return ( - + + One Two Three - ); } export function NonWrapping() { return ( - + Paid Processing Fulfilled @@ -121,23 +123,9 @@ export function Spacing() { return ( Paid + Processing Fulfilled - - ); -} - -export function VerticalCentering() { - return ( - - - Order -
- #1136 -
- was paid -
- Paid - Fulfilled + Completed
); } diff --git a/polaris-react/src/components/Inline/Inline.tsx b/polaris-react/src/components/Inline/Inline.tsx index f2212666783..106568dd74b 100644 --- a/polaris-react/src/components/Inline/Inline.tsx +++ b/polaris-react/src/components/Inline/Inline.tsx @@ -1,8 +1,6 @@ import React from 'react'; import type {SpacingSpaceScale} from '@shopify/polaris-tokens'; -import {elementChildren} from '../../utilities/components'; - import styles from './Inline.scss'; const AlignY = { @@ -43,13 +41,9 @@ export const Inline = function Inline({ '--pc-inline-spacing': `var(--p-space-${spacing})`, } as React.CSSProperties; - const itemMarkup = elementChildren(children).map((child, index) => { - return
{child}
; - }); - return (
- {itemMarkup} + {children}
); };