Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(card): [EMU-7042] Add falsy value option for actionIcon and fix actionable card sizes #289

Conversation

diogomateus
Copy link
Collaborator

@diogomateus diogomateus commented Jan 12, 2024

What this PR does

This PR fixes:

  • card action action which now allows to use falsy values to not render it (e.g. <Card actionIcon={null} />)
  • fixes card sizes that were differently if it was an action card, with and without action icon.

Solves:
EMU-7042

Before:
Screenshot 2024-01-12 at 11 51 19

After:
Screenshot 2024-01-12 at 11 47 17

How to test?

Run storybook and check the Card stories.

Checklist:

  • I reviewed my own code
  • The changes align with the designs I received
    Or give a reason why this does not apply:
  • I have attached screenshot(s), video(s) or gif(s) showing that the solution is working as expected
    Or give a reason why this does not apply:
  • I have updated the task(s) status on Linear
  • All new media is optimized (images, gifs, videos)

Browser support

My code works in the following browsers:

  • Firefox
  • Chrome
  • Safari
  • Edge

Copy link
Contributor

@a-maffei a-maffei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied actionIcon={null} and compared card sizes with and without the action icon - everything works as described 👍

Copy link
Contributor

@talo242 talo242 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @diogomateus! 💅🏼

@diogomateus diogomateus merged commit 4e86bb1 into main Jan 12, 2024
4 checks passed
@diogomateus diogomateus deleted the diogo/emu-7042-allow-passing-null-actionicon-to-card-component branch January 12, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants