-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Icon] updating source prop to accept a react node #635
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
Conversation
a32aa21
to
7f321dd
Compare
7f321dd
to
7247485
Compare
6cf48e0
to
f65f8af
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.
I don't think we should release this without adding onto the docs. We only support 20 by 20 icons and allowing a react node for source gives a lot of freedom. When should outline what we accept in our documentation
@AndrewMusgrave brings up a good point... since react node take anything really we should document the size. |
f65f8af
to
ba110ec
Compare
49cfd79
to
c550987
Compare
I update the docs around the prop. I wonder if that is sufficient. What do you think @AndrewMusgrave? |
LGTM! |
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.
Prop comment LGTM 👍
Did you 🎩 on a cra? @dleroux |
c550987
to
24ba508
Compare
24ba508
to
12c75c1
Compare
Yes I did @AndrewMusgrave. It works well. |
fixes: #449
WHY are these changes introduced?
In create-react-app 2, svg are loaded as components. This break our Icon component.
WHAT is this pull request doing?
Allows to use a React Component at the source of the icon.
How to 🎩
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist