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

IconButton unknown props warning #4851

Closed
StefanAlves opened this issue Jul 29, 2016 · 6 comments
Closed

IconButton unknown props warning #4851

StefanAlves opened this issue Jul 29, 2016 · 6 comments
Labels
bug 🐛 Something doesn't work component: icon button This is the name of the generic UI component, not the React module!

Comments

@StefanAlves
Copy link

StefanAlves commented Jul 29, 2016

Problem description

A warning is raised for unknown props when I pass tooltipStyles for IconButton.

The issue is related to #4594

Steps to reproduce

To reproduce this issue you just have to pass an object for the tooltipStyles prop.
Ex:

<IconButton tooltipStyles = { myStyles } >....

Versions

  • Material-UI: 0.15.2
@carlgunderson
Copy link

I'm still seeing the warnings in version 0.15.3 for disabledBackgroundColor and disabledLabelColor properties of the RaisedButton component.

@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@ryanblakeley
Copy link

ryanblakeley commented Nov 21, 2016

I'm getting a similar warning for the primary prop with IconButton.

Unknown prop `primary` on <button> 

@hackingbeauty
Copy link
Contributor

I'm getting:

Unknown prop `raised` on <button> 

@Shahrukh-Zindani
Copy link

@StefanAlves I tried using the tooltipStyles prop in IconButton and it works just fine.
I will post the code I used to reproduce the issue.

import React, {Component} from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import IconButton from 'material-ui/IconButton';
import FontIcon from 'material-ui/FontIcon';
import ActionHome from 'material-ui/svg-icons/action/home';
import injectTapEventPlugin from 'react-tap-event-plugin';
import './App.css'

injectTapEventPlugin();

const styles = {
 boxSizing: 'border-box',
 paddingLeft: '30px',
 border: "1px solid #979797",
 backgroundColor: "#0000FF",
};


class Child extends Component{
	render(){
		return(
		  <MuiThemeProvider>
		      <div>
                         <IconButton tooltipStyles= {styles} tooltip="Font Icon">
                             <FontIcon className="icon-home" />
                         </IconButton>
		      </div>
		  </MuiThemeProvider>
		)
	}
}


export default Child

@carlgunderson If you update your material-ui version to the latest release 0.17.0, you will stop seeing the warning as it was fixed in a later release.

@rojobuffalo primary is not a prop of IconButton so you will see the warning.

@hackingbeauty raised' is not a prop of IconButton` so that warning is expected. If you saw that warning for something else, please elaborate for a better answer.

@Shahrukh-Zindani
Copy link

@oliviertassinari This issue can be closed if there is no further discussion.

@oliviertassinari
Copy link
Member

@Shahrukh-Zindani Looking at the source code, it should be fine. Thanks.

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: icon button This is the name of the generic UI component, not the React module! labels Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: icon button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

6 participants