Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary: 1. Allow custom `OptionItem` components by using `DetailCell` internally. - Removed `ClickableBehavior` from `OptionItem` and replaced it with `DetailCell` (which internally uses `Clickable`). - Added stories and included docs for `OptionItem`. 2. Modified Cell to support a new prop required for the `Optionitem` changes: - `aria-selected` is used to allow the `OptionItem` to be selectable (via aria attributes). Issue: WB-1645 ## Test plan: ### SingleSelect: 1. Navigate to http://localhost:6061/?path=/docs/dropdown-singleselect--docs#custom-option-items 2. Verify that the custom option items are rendered as expected. 3. Verify that the custom option items are clickable and that clicking on them selects them. https://github.com/Khan/wonder-blocks/assets/843075/6d171969-cc1e-4922-bbcf-16e23cb8e4d4 ### MultiSelect: 1. Navigate to http://localhost:6061/?path=/docs/dropdown-multiselect--docs#custom-option-items 2. Verify that the custom option items are rendered as expected. 3. Verify that the custom option items are clickable and that clicking on them selects them. https://github.com/Khan/wonder-blocks/assets/843075/e60716a7-533c-45c4-b239-c282de7dbaf9 ### OptionItem docs: 1. Navigate to http://localhost:6061/?path=/docs/dropdown-optionitem--docs 2. Verify that the documentation for `OptionItem` is correct and up to date. <img width="1014" alt="Screenshot 2023-12-13 at 12 07 11 PM" src="https://github.com/Khan/wonder-blocks/assets/843075/21ae9f3e-08af-4bca-83ff-e687db4859c0"> Author: jandrade Reviewers: jandrade, jeresig Required Reviewers: Approved By: jeresig Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 16.x), ✅ codecov/project, ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Lint (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 16.x), ⏭ Chromatic - Skip on Release PR (changesets), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ⏭ dependabot, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ✅ gerald Pull Request URL: #2139
- Loading branch information