-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Icon] unknown string icon name renders blank icon #2928
Conversation
6575a1c
to
62aa1b1
Compare
unknown string icon name renders blank iconPreviews: documentation | landing | table |
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.
Thank you :D
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.
comment about wording, otherwise cool
const paths = this.renderSvgPaths(pixelGridSize, icon); | ||
if (paths == null) { | ||
return null; | ||
} |
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.
so now it will always have an empty <svg>
instead of nothing?
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.
if you say <Icon icon="blah" />
then yes. <Icon icon={null} />
renders null
.
* nothing. | ||
* - If given an `IconName` (a string literal union of all icon names), that | ||
* icon will be rendered as an `<svg>` with `<path>` tags. Unknown strings | ||
* will render a blank icon. |
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.
is a "blank icon" different than an empty <svg>
? if so, how? if not, how is it an "icon" at all?
the wording makes it sound like there is some sort of stand in icon for a "blank" situation, kind of like the broken <img>
graphic.
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.
Update icon.tsxPreviews: documentation | landing | table |
Fixes #2925
Changes proposed in this pull request: