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: While working on adding custom option items to Dropdowns, I noticed that the `className` prop was not being appended to the `Text` component. This PR fixes that by changing the logic to append the `className` prop to the `Text` if it includes both a `className` and a `style` prop. Also updated the typography docs to include an example of using the `style` and `className` props. Issue: WB-1645 ## Test plan: Verify that the unit tests pass. Also verify that the following story works as expected: http://localhost:6061/?path=/docs/typography--docs#with-style 1. Verify that the text is blue (assigned via `style`). 2. Verify that the has a bg color (assigned via `className` + `css()`). 3. Lastly, verify that it includes a black border (assigned via `className` + and external css import). <img width="864" alt="Screenshot 2023-12-13 at 11 29 24 AM" src="https://github.com/Khan/wonder-blocks/assets/843075/aaf73683-ab6d-41ee-b1f2-7bd6d85abc49"> Author: jandrade Reviewers: 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), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Lint (ubuntu-latest, 16.x), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 16.x), ⏭ Chromatic - Skip on Release PR (changesets), 🚫 Chromatic - Get results on regular PRs, ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Lint (ubuntu-latest, 16.x), ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ✅ gerald, 🚫 Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 16.x), ⏭ Chromatic - Skip on Release PR (changesets), 🚫 Chromatic - Get results on regular PRs, ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ✅ gerald, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Lint (ubuntu-latest, 16.x), 🚫 Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 16.x), ⏭ Chromatic - Skip on Release PR (changesets) Pull Request URL: #2138
- Loading branch information