Creating a navbar with material-ui

后端 未结 6 1016
予麋鹿
予麋鹿 2021-02-05 03:37

I\'m trying to create a simple navbar with material-ui that looks like the one they use on their site. This is the code I wrote to try to replicate it:

import Re         


        
6条回答
  •  终归单人心
    2021-02-05 04:07

    Did you read the Material-UI documentation?

    Try passing your content as the iconElementRight prop.

    ie:

    render() {
        var myTabs = (
            
                
                
            
        );
        return 
    }
    

    Although, it does appear there are only 3 styles that are supported (as seen by the 3 examples in the docs). You might have to get creative with the styling, because it doesn't appear to be very flexible.

    PS good luck, because since their switch to inline-styles and their own custom themes, it's pretty hard to change things or integrate other non-mui components (I was so put-off by this I created a fork that uses SASS https://www.npmjs.com/package/material-ui-with-sass)

提交回复
热议问题