0

I looked the code on http://www.material-ui.com/#/components/raised-button.

When I does not use the material-ui, the Nav work well.

5:8 warning 'RaisedButton' is defined but never used no-unused-vars
15:11 warning 'style' is assigned a value but never used no-unused-vars
22:10 error 'MuiThemeProvider' is not defined react/jsx-no-undef
22:37 error 'muiTheme' is not defined no-undef
26:14 error 'RaiseButton' is not defined react/jsx-no-undef
26:39 warning Style prop value must be an object react/style-prop-object
27:14 error 'RaiseButton' is not defined react/jsx-no-undef
27:39 warning Style prop value must be an object react/style-prop-object

import RaisedButton from 'material-ui/RaisedButton';

class Nav extends Component {
  render () {
    const style = {
      margin: 12,
    };
    return (
        <nav>
            <RaiseButton label="机构管理" style="{style}"  containerElemet={<Link to="/"></Link>} />
            <RaiseButton label="报名成员" style="{style}" containerElemet={<Link to="/apply"></Link>} />
            <RaiseButton label="全部成员" style="{style}"  containerElemet={<Link to="/driftMember"></Link>}/>
            <RaiseButton label="全部成员" style="{style}" containerElemet={<Link to="/allMember"></Link>}/>
            <RaiseButton label="文案设置" style="{style}" containerElemet={<Link to="/textSet"></Link>} />
        </nav>
    );
  }
}

1 Answer 1

2

You have a typo in your code. It's "Raised" Button, not "Raise".

EDIT:

Also, note that style="{style}" should be style={style} without the quotes

and containerElemet should be containerElement (you missed the n)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.