mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-13 21:24:58 +08:00
f48875d681
- 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
20 lines
557 B
CoffeeScript
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
|