AppBar

2016-03-21 15 views
0

'daki öğeleri hizalayamıyorum AppBar sayfamdaki bazı öğeleri hizalamakta zorlanıyorum. Bütün unsurların sonra, sağa o MoreVertIcon yerleştirmeniz gerekir ama her zaman çocuklara önce gösterir:AppBar

export default class MainMenu extends React.Component { 
    render() { 
     return (
      <AppBar title="Dashboard" iconElementRight={ 
       <IconMenu 
        iconButtonElement={ 
         <IconButton><MoreVertIcon /></IconButton> 
        } 
        targetOrigin={{horizontal: 'right', vertical: 'top'}} 
        anchorOrigin={{horizontal: 'right', vertical: 'top'}} 
       > 
        <MenuItem primaryText="Refresh" /> 
        <MenuItem primaryText="Help" /> 
        <MenuItem primaryText="Sign out" /> 
       </IconMenu> 
      }> 
       <FlatButton label="Foo" style={styles.items}/> 
       <FlatButton label="Bar" style={styles.items}/> 
      </AppBar> 
     ); 
    } 
} 

cevap

0

Sadece tümü için bir bileşen yaptı:

İşte

enter image description here

kod bu şu gibi sağ el maddeleri:

});

Sonra orijinal bileşenin içine şunlardır:

<AppBar title="Dashboard" 
      iconElementRight={<RightSideStuff/>} 
      style={styles.appbar} 
    /> 

Bu, tüm bu şeyler yerine bir grupla tarayıcısı kontrolünü ele ve sırayla şeyler render olarak appubar ekranı sağlar.

İlgili konular