-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Fix Typeset
Doc block fontSizes
type
#26475
Docs: Fix Typeset
Doc block fontSizes
type
#26475
Conversation
@noranda appreciate you taking the time to put together this pull request. We appreciate it 🙏 ! @kylegach when you have a moment can you check this and follow up with @JReinhold and the contributor for documentation. Thanks in advance. |
@@ -35,7 +35,7 @@ const Wrapper = styled.div(withReset, ({ theme }) => ({ | |||
|
|||
export interface TypesetProps { | |||
fontFamily?: string; | |||
fontSizes: string[]; | |||
fontSizes: number[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proper type would actually be (string | number)[]
because that's the type of the underlying data model. It would be great if you could update the docs to reflect this as well.
fontSizes: number[]; | |
fontSizes: (string | number)[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JReinhold Thanks! All set!
a7413a1
to
e1a3ba6
Compare
e1a3ba6
to
46e3617
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We've just entered feature freeze for 8.1, so we wont be merging this until next week.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 4496b48. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Typeset
fontSizes
type to match docsTypeset
Doc block fontSizes
type
What I did
Fixes the type for
fontSizes
in theTypeset
block to match the docs.Currently, Typescript will throw an error if you try to pass in a
number[]
to this prop. You either need to typecast anumber[]
to astring[]
, or pass in a string array with thepx
in order for it to work.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
yarn task --task sandbox --start-from auto --template react-vite/default-ts
.Typeset
component and pass in an array of numbers tofontSizes
.Documentation
No updates to documentation needed.
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.