Mailspring/src/components/disclosure-triangle.cjsx
Juan Tejada f48875d681 fix(sidebar): Add minor tweaks to sidebar behavior:
- Add default prop to DisclosureTriangle to eliminate warning
- Prevent from firing a new DestroyCategoryTask if category already is
deleted
- Update onBlur event to not close input if I click on the add button
2015-11-24 11:09:00 -08:00

20 lines
557 B
CoffeeScript

React = require 'react'
class DisclosureTriangle extends React.Component
@displayName: 'DisclosureTriangle'
@propTypes:
collapsed: React.PropTypes.bool
visible: React.PropTypes.bool
onToggleCollapsed: React.PropTypes.func
@defaultProps:
onToggleCollapsed: ->
render: ->
classnames = "disclosure-triangle"
classnames += " visible" if @props.visible
classnames += " collapsed" if @props.collapsed
<div className={classnames} onClick={@props.onToggleCollapsed}><div></div></div>
module.exports = DisclosureTriangle