Change the sidebar to use Flexbox for container

This commit is contained in:
Ben Gotow 2016-01-20 13:04:06 -08:00
parent b538ec050c
commit 1d55f1ac11

View file

@ -1,6 +1,6 @@
_ = require 'underscore' _ = require 'underscore'
React = require 'react' React = require 'react'
{OutlineView, ScrollRegion} = require 'nylas-component-kit' {OutlineView, ScrollRegion, Flexbox} = require 'nylas-component-kit'
AccountSwitcher = require './account-switcher' AccountSwitcher = require './account-switcher'
SidebarStore = require '../sidebar-store' SidebarStore = require '../sidebar-store'
@ -39,15 +39,15 @@ class AccountSidebar extends React.Component
render: => render: =>
{accounts, focusedAccounts, userSections, standardSection} = @state {accounts, focusedAccounts, userSections, standardSection} = @state
<div style={height: '100%'}> <Flexbox direction="column" style={order: 0, flexShrink: 1, flex: 1}>
<AccountSwitcher accounts={accounts} focusedAccounts={focusedAccounts} /> <AccountSwitcher accounts={accounts} focusedAccounts={focusedAccounts} />
<ScrollRegion className="account-sidebar" > <ScrollRegion className="account-sidebar" style={order: 2}>
<div className="account-sidebar-sections"> <div className="account-sidebar-sections">
<OutlineView {...standardSection} /> <OutlineView {...standardSection} />
{@_renderUserSections(userSections)} {@_renderUserSections(userSections)}
</div> </div>
</ScrollRegion> </ScrollRegion>
</div> </Flexbox>
module.exports = AccountSidebar module.exports = AccountSidebar