-
Notifications
You must be signed in to change notification settings - Fork 85
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
Invalid prop label
supplied to InputGroup
#492
Comments
Here's your code in a Sandbox: https://codesandbox.io/s/x786o09k0q No warnings there. Not sure how you're getting an error here - are you wrapping the If we relax the prop types, we run the risk of somebody passing in a non- |
I've no idea, haven't had time to look closer at it. If someone passes a non-label it would, as you say throw a warning anyway. |
I'm basically doing that exact same thing as the codesandbox and I'm also getting a warning when doing this with The Label stuff is gone now, but I do still get a warning for the So what's going on here then? The import is import { InputGroup, Tooltip } from '@sb1/ffe-form-react'; But there seems to be some mischief with my version, output from
and
So I seem to be running two different versions here. And lo and behold, the warning pops up as soon as |
@selbekk the problem seems to be that I'm going to go ahead and propose moving the dependency to a peerDependency, whatcha think? EDIT: Better yet, just merge |
+1 on deprecating |
Great job on figuring out what the bug was! |
I'll do this when I get around to it, hopefully before Yule. |
Which package is this issue related to?
ffe-form-react
Describe your issue (screenshots welcome!)
I am getting an "Invalid prop
label
supplied toInputGroup
" message when passing the exportedLabel
component to thelabel
prop ofInputGroup
What is the expected behavior?
Since the documentation at https://design.sparebank1.no/styleguidist/index.html#!/InputGroup says I am allowed to pass a
Label
component I don't expect any console warnings.What is the actual behavior?
I get console warnings.
Steps to reproduce
Do note that doing this in the actual designguide does not produce a warning, but doing it in a consuming application does (At least on
4.2.0
).Suggestion: Relax the prop-check to be
node
/string
rather thancustom
/string
which it is today.The text was updated successfully, but these errors were encountered: