-
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.
Add style and dropdownStyle props to BirthdayPicker (#2288)
## Summary: To allow the BirthdayPicker to be rendered in a wider variety of locations, such as narrow modals or mobile views, two new props have been added. "style" which allows the caller to add styles to the root element of the BirthdayPicker, and "dropdownStyle" which applies styles to the individual dropdowns. As opposed to a more narrow approach of specifying a "vertical" prop, this broad approach relieves the component of having to know when to render horizontally or vertically. This logic is placed in the callers hands, which can easily be determined via media query. Issue: None ## Test plan: - View http://localhost:6061/?path=/story/packages-birthdaypicker--birthday-picker-vertical - ensure component displays in a top to bottom manner - View http://localhost:6061/?path=/story/packages-birthdaypicker--birthday-picker-vertical-with-error - ensure component displays in the same manner, with an error message - reran unit tests, ensure they pass Author: dmcalpin Reviewers: jeresig, evanchaney, beaesguerra, russell-ka Required Reviewers: Approved By: jeresig, evanchaney, beaesguerra Checks: ✅ codecov/project, ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Test (ubuntu-latest, 20.x, 2/2), ✅ Test (ubuntu-latest, 20.x, 1/2), ✅ Lint (ubuntu-latest, 20.x), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ⏭️ Chromatic - Skip on Release PR (changesets), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏭️ dependabot, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #2288
- Loading branch information
Showing
4 changed files
with
79 additions
and
8 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-birthday-picker": patch | ||
--- | ||
|
||
Added style and dropdownStyle props to BirthdayPicker |
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
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