Material-ui: IconButton unknown props warning

Created on 29 Jul 2016  路  6Comments  路  Source: mui-org/material-ui

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
bug 馃悰 IconButton

Most helpful comment

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

All 6 comments

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

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

Unknown prop `primary` on <button> 

I'm getting:

Unknown prop `raised` on <button> 

@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 ofIconButton` so that warning is expected. If you saw that warning for something else, please elaborate for a better answer.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pola88 picture pola88  路  3Comments

mb-copart picture mb-copart  路  3Comments

reflog picture reflog  路  3Comments

revskill10 picture revskill10  路  3Comments

activatedgeek picture activatedgeek  路  3Comments