-
Notifications
You must be signed in to change notification settings - Fork 10
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: - Changed the border color from `offBlack16` to `offBlack50` to be consistent with the rest of form fields. - Also applied a few Storybook fixes: - Refactored arg types to use categories - Fixed interactive story to support switching `selectionType` values without breaking the story. Issue: WB-1677 ## Test plan: Navigate to the Combobox docs in Storybook and verify the following: 1. The border color is now `offBlack50`. 2. The arg types are now categorized. 3. The interactive story should now support switching `selectionType` values without breaking the story. This means that the story should try to preserve the `value` when switching between `single` and `multi` selection types. https://github.com/user-attachments/assets/0d8481d8-5fcf-4c0e-b665-0798c22f3e0c Author: jandrade Reviewers: beaesguerra Required Reviewers: Approved By: beaesguerra Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Lint (ubuntu-latest, 20.x), ✅ Test (ubuntu-latest, 20.x, 2/2), ✅ Test (ubuntu-latest, 20.x, 1/2), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ⏭️ Chromatic - Skip on Release PR (changesets), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald, ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏭️ dependabot Pull Request URL: #2308
- Loading branch information
Showing
4 changed files
with
117 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-dropdown": patch | ||
--- | ||
|
||
Update borderColor to be more a11y friendly |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import {ArgTypes} from "@storybook/react"; | ||
|
||
const argTypes: ArgTypes = { | ||
autoComplete: { | ||
options: ["none", "list"], | ||
control: {type: "select"}, | ||
}, | ||
|
||
/** | ||
* States | ||
*/ | ||
disabled: { | ||
table: { | ||
category: "States", | ||
}, | ||
}, | ||
loading: { | ||
table: { | ||
category: "States", | ||
}, | ||
}, | ||
opened: { | ||
table: { | ||
category: "States", | ||
}, | ||
}, | ||
|
||
/** | ||
* Visual Style | ||
*/ | ||
style: { | ||
table: { | ||
category: "Visual style", | ||
}, | ||
}, | ||
light: { | ||
table: { | ||
category: "Visual style", | ||
}, | ||
}, | ||
|
||
/** | ||
* Events | ||
*/ | ||
onToggle: { | ||
table: { | ||
category: "Events", | ||
}, | ||
}, | ||
|
||
onChange: { | ||
table: { | ||
category: "Events", | ||
}, | ||
}, | ||
|
||
labels: { | ||
table: { | ||
type: { | ||
summary: "ComboboxLabels", | ||
detail: "See wonder-blocks-dropdown/src/util/types.ts", | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default argTypes; |
This file contains 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
This file contains 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