Skip to content

Commit

Permalink
fix(card-pictogram): show body copy on both pictogram positions (#8359)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

#8302

### Description

- This PR fixes the issue where animation is not being applied to Card Pictorgram with the top position. This was an issue seen within the Web Component (React Wrapper).


### Changelog

**Changed**

- Set the body copy knob to show for both `top` and `bottom` position and not just `bottom`

### Testing

- Visit the Web Components (React Wrapper) storybook preview
- Navigate to `carbon-for-ibm-dotcom/canary/web-components-react/?path=/story/components-card--pictogram`
- Ensure that the body copy and animation get render correct for the "top" and " bottom" pictogram positions.

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
proeung authored Feb 24, 2022
1 parent c8f4c56 commit 96f027f
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,11 @@ Pictogram.story = {
knobs: {
PictogramCard: ({ groupId }) => {
const pictogramPlacement = select('Pictogram position:', pictogramPlacements, pictogramPlacements.top, groupId);
const copy =
pictogramPlacement === pictogramPlacements.bottom
? textNullable(
'Body copy:',
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat',
groupId
)
: null;
const copy = textNullable(
'Body copy:',
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat',
groupId
);
return {
pictogramPlacement,
heading: textNullable('Heading:', 'Aerospace and defence', groupId),
Expand Down

0 comments on commit 96f027f

Please sign in to comment.