{ComponentRegistry, WorkspaceStore, Actions} = require "nylas-exports" {RetinaImg} = require 'nylas-component-kit' React = require "react" _ = require "underscore" ## ## THIS FILE IS NOT IN USE! DEPRECATED IN FAVOR OF ModeToggle ## class ModeSwitch extends React.Component @displayName: 'ModeSwitch' constructor: (@props) -> @state = @_getStateFromStores() componentDidMount: => @unsubscribe = WorkspaceStore.listen @_onStateChanged componentWillUnmount: => @unsubscribe?() render: => return
unless @state.visible knobX = if @state.mode is 'list' then 25 else 41 # Currently ModeSwitch is an opaque control that is not intended # to be styled, hence the fixed margins and positions. If we # turn this into a standard component one day, change!