Skip to content

Conversation

@raquelarrojo
Copy link
Collaborator

@raquelarrojo raquelarrojo commented Apr 10, 2024

Checklist
(Check off all the items before submitting)

  • Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
Several fixes in the chip component:

  • Disabled state only affects to the icon with action, not to the entire component.
  • Several types fixed:
    - disabled is only allowed when onClickPrefix or onClickSuffix exist.
    - It is not possible to add both prefixIcon and suffixIcon with action, only one of them with action can be added.
    - It is not possible to add both prefixIcon and suffixIcon (without action), only one of them can be added.
    - It is possible to add an icon with action and an icon without. For example: prefix with action but suffix without it.

Snapshots
Before the disabled affected the whole component:
image

Now disabled only affects the icon with action:

image

Documentation will be updated in a separate PR after this one is merged.

Closes #1873 and #1707

@raquelarrojo raquelarrojo linked an issue Apr 10, 2024 that may be closed by this pull request
@raquelarrojo raquelarrojo marked this pull request as ready for review April 10, 2024 14:32
@raquelarrojo raquelarrojo changed the title Action fixes in the Chip Several fixes in the Chip Apr 10, 2024
@Mil4n0r Mil4n0r self-requested a review April 11, 2024 09:49
@Mil4n0r Mil4n0r self-assigned this Apr 11, 2024
@raquelarrojo raquelarrojo requested a review from Mil4n0r April 15, 2024 14:14
Mil4n0r
Mil4n0r previously approved these changes Apr 15, 2024
Copy link
Collaborator

@Mil4n0r Mil4n0r left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Good job!

@Mil4n0r Mil4n0r merged commit b18ba60 into master Apr 15, 2024
@Mil4n0r Mil4n0r deleted the rarrojolopez/chip-fixes branch April 15, 2024 14:42
@raquelarrojo raquelarrojo restored the rarrojolopez/chip-fixes branch April 18, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chip must not have both prefix and suffix actions disabled in chip should only affect to the icon

3 participants