Carbon: The prop `small` for Button has been deprecated in favor of `size`. Please use `size="small"` instead.

Created on 6 Aug 2019  路  5Comments  路  Source: carbon-design-system/carbon

What package(s) are you using?

  • [ ] carbon-components
  • [x] carbon-components-react

Detailed description

Describe in detail the issue you're having.

After upgrading to latest version of carbon-react, I have this warning for buttons even if I don't set up the size attribute!

The prop small for Button has been deprecated in favor of size. Please use size="small" instead.

Is this issue related to a specific component?

No

What did you expect to happen? What happened instead? What would you like to
see changed?

No warning!

What browser are you working in?

Chrome

What version of the Carbon Design System are you using?
7.2.0

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

Steps to reproduce the issue

It happened after upgrading to latest version:
image

Sandbox:
https://codesandbox.io/s/reverent-firefly-pyc03

Please create a reduced test case in CodeSandbox

Additional information

  • Screenshots or code
  • Notes
bug 馃悰

Most helpful comment

OK sounds that it'll be fixed in the next release, but please don't hesitate to speak up otherwise!

All 5 comments

Strange, I can't get it to reproduce locally but I'm seeing the issue on your CodeSandbox... taking a deeper look

I'm also running into this issue while working to update from 10.3.1 to 10.4.1. It doesn't appear consistently for all buttons. I haven't yet been able to isolate why only some of the buttons in our addons lib see this warning.

Edit:
The deprecation helper was added to Button in 10.4, but 10.4.1 does not contain the removal of the default prop for small, which should resolve this.

OK sounds that it'll be fixed in the next release, but please don't hesitate to speak up otherwise!

That's OK. Not critical. Thanks

Going to close this out as I believe it's been addressed, leave a comment if not and I can re-open!

Was this page helpful?
0 / 5 - 0 ratings