Skip to content
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

TypeScript: Some T-shirt sizes not listed in SizeProps #18788

Closed
daven97 opened this issue Mar 7, 2022 · 5 comments
Closed

TypeScript: Some T-shirt sizes not listed in SizeProps #18788

daven97 opened this issue Mar 7, 2022 · 5 comments
Assignees
Labels
Milestone

Comments

@daven97
Copy link

daven97 commented Mar 7, 2022

TypeScript error saying that the xl size is invalid.
Screen Shot 2022-03-07 at 1 20 29 PM

Screen Shot 2022-03-07 at 12 35 46 PM

The docs at https://fontawesome.com/docs/web/style/size has this list of size options:
Screen Shot 2022-03-07 at 12 53 57 PM

and the fontawesome-react docs at https://fontawesome.com/docs/web/use-with/react/style#size state:

Font Awesome supports t-shirt size scale from 2xs to 2xl as well as literal sizing from 1x to 10x.

However, looking at @robmadole's changes to SizeProp in https://github.com/FortAwesome/Font-Awesome/blob/65f4bdb5025759ba25cd3432568de288b6a67527/js-packages/%40fortawesome/fontawesome-svg-core/index.d.ts as part of #18652, several of the sizes from the table above are missing, including xl.

Screen Shot 2022-03-07 at 1 03 23 PM

The icon is displaying at the correct size, so this is simply a TypeScript error.

@daven97
Copy link
Author

daven97 commented Mar 7, 2022

I believe this is as simple as updating the type, so I have created this PR: #18789.

@tagliala
Copy link
Member

tagliala commented Mar 7, 2022

Thanks. I've assigned both @mlwilkerson and @robmadole

@theDanielJLewis
Copy link

Thanks for reporting this and creating the PR, @daven97! I'm running into this issue, too. So I'll be grateful when the PR is merged.

@tagliala tagliala added this to the 6.2.0 milestone Sep 3, 2022
@tagliala
Copy link
Member

tagliala commented Sep 3, 2022

I can see it fixed in 6.2.0

export type SizeProp =
| "2xs"
| "xs"
| "sm"
| "lg"
| "xl"
| "2xl"
| "1x"
| "2x"
| "3x"
| "4x"
| "5x"
| "6x"
| "7x"
| "8x"
| "9x"
| "10x";

@tagliala tagliala closed this as completed Sep 3, 2022
@daven97
Copy link
Author

daven97 commented Oct 11, 2022

Sorry I missed that this issue had been closed. This is working for me now in 6.2.0! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants