Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that disabled Button components rendered as links do not display an underline.
- Introduces an
isEnabledflag to style logic - Applies full button styles only when enabled, and sets
textDecoration: 'none'when disabled - Adds a test to verify that disabled links have no underline
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/ui-buttons/src/BaseButton/styles.ts | Added isEnabled state and made baseButton styles conditional on that flag |
| packages/ui-buttons/src/BaseButton/props.ts | Extended BaseButtonStyleProps with a new isEnabled property |
| packages/ui-buttons/src/BaseButton/index.tsx | Removed conditional CSS prop and always applies styles.baseButton |
| packages/ui-buttons/src/BaseButton/new-tests/BaseButton.test.tsx | New test confirming disabled link Buttons have no underline |
|
matyasf
requested changes
Jun 10, 2025
| '&:hover > [class$=-baseButton__content]': colorVariants[color!].hover | ||
| } | ||
| : { | ||
| textDecoration: 'none' |
Collaborator
There was a problem hiding this comment.
Please add here these:
label: 'baseButton',
appearance: 'none',
Label is needed, so it's easier to identity what this is in the DOM (also unit tests might use it), appearance: none might prevent some custom CSS to override things here (although I could not override it)
014f238 to
7118312
Compare
matyasf
approved these changes
Jun 10, 2025
balzss
approved these changes
Jun 12, 2025
7118312 to
05f72d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
INSTUI-4540
ISSUE:
TEST PLAN: