Repository navigation
fix: Add data-selected attribute to cardPrimary and cardHorizontal - #1292
andrewgrano wants to merge 2 commits into
Conversation
|
data-selected attribute to cardPrimary and cardHorizontaldata-selected attribute
data-selected attributedata-selected attribute to cardPrimary and cardHorizontal
data-selected attribute to cardPrimary and cardHorizontaldata-selected attribute to cardPrimary and cardHorizontal
Chromatic Storybook
Built from commit: Statuses as of the end of the run. The build link shows the live review state. |
XOP
left a comment
There was a problem hiding this comment.
please check the note,
some tests and formatting require minor updates
| <div | ||
| tabIndex={disabled ? -1 : 0} | ||
| aria-disabled={disabled} | ||
| data-selected={Boolean(isSelected)} |
There was a problem hiding this comment.
please use the following pattern:
data-selected={isSelected || undefined}
similar in other card
|
Andrew Ycode seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Description
data-selectedattribute tocardPrimaryandcardHorizontal, reflecting theisSelectedpropLinks and tickets
Fixes issue #350
Checklist
Contribution
buildandbuild-storybookwork locallyNote
Low Risk
Small DOM attribute and test additions with no auth, data, or behavioral logic changes.
Overview
Adds a stable
data-selectedattribute on the root wrapper ofCardPrimaryandCardHorizontal, set from the existingisSelectedprop as string"true"or"false"viaBoolean(isSelected).Selection styling still comes from the existing variant classes; the new attribute is for tests and consumers that need to assert selected state without depending on generated CSS module class names. Unit tests cover both selected and unselected cases for each component.
Reviewed by Cursor Bugbot for commit 72515f7. Bugbot is set up for automated code reviews on this repo. Configure here.