diff --git a/packages/doc/content/components/components/card/plancard-web.mdx b/packages/doc/content/components/components/card/plancard-web.mdx index 75afd51c5e..b334ca539c 100644 --- a/packages/doc/content/components/components/card/plancard-web.mdx +++ b/packages/doc/content/components/components/card/plancard-web.mdx @@ -157,7 +157,7 @@ Display an extra content before the divider. @@ -165,6 +165,34 @@ Display an extra content before the divider. ``` +#### List item with a clickable content + +```javascript + + + + alert('List item clicked!')} + /> + alert('List item clicked!')} + /> + + + +``` + ### Props #### PlanCard diff --git a/packages/yoga/src/Card/web/PlanCard/List.jsx b/packages/yoga/src/Card/web/PlanCard/List.jsx index 9fa3fdf295..1c29426e10 100644 --- a/packages/yoga/src/Card/web/PlanCard/List.jsx +++ b/packages/yoga/src/Card/web/PlanCard/List.jsx @@ -37,7 +37,7 @@ const Item = styled.li` const Wrapper = styled(Box)` display: flex; flex-direction: column; - min-width: 0; + width: 100%; ${props => props.as === 'button' && @@ -46,6 +46,7 @@ const Wrapper = styled(Box)` padding: 0; background: transparent; cursor: pointer; + text-align: start; `} svg { @@ -103,7 +104,7 @@ const ListItem = withTheme(props => { return ( - + {Icon && ( {isValidElement(Icon) ? ( diff --git a/packages/yoga/src/Card/web/PlanCard/__snapshots__/PlanCard.test.jsx.snap b/packages/yoga/src/Card/web/PlanCard/__snapshots__/PlanCard.test.jsx.snap index f5fa1f0cc4..82f518c637 100644 --- a/packages/yoga/src/Card/web/PlanCard/__snapshots__/PlanCard.test.jsx.snap +++ b/packages/yoga/src/Card/web/PlanCard/__snapshots__/PlanCard.test.jsx.snap @@ -2,6 +2,7 @@ exports[` Snapshots should match snapshot with default PlanCard 1`] = ` .c15 { + width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -283,7 +284,7 @@ exports[` Snapshots should match snapshot with default PlanCard 1`] -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; - min-width: 0; + width: 100%; } .c14 svg { @@ -398,6 +399,7 @@ exports[` Snapshots should match snapshot with default PlanCard 1`]
Snapshots should match snapshot with default PlanCard 1`]
Snapshots should match snapshot with variant 1`] = ` exports[` Snapshots should render list item content as button 1`] = ` .c15 { + width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -1069,11 +1073,12 @@ exports[` Snapshots should render list item content as button 1`] = -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; - min-width: 0; + width: 100%; border: none; padding: 0; background: transparent; cursor: pointer; + text-align: start; } .c14 svg { @@ -1189,6 +1194,7 @@ exports[` Snapshots should render list item content as button 1`] =
Snapshots should render list item content as button 1`] =