From efd8ce920f8ab3480a17052052c5fb398ee8a443 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 11 Jan 2017 04:21:49 +0100 Subject: [PATCH] Better animations --- .../components/column_collapsable.jsx | 2 +- .../components/components/icon_button.jsx | 22 ++++++++++++++----- .../components/status_action_bar.jsx | 2 +- .../features/status/components/action_bar.jsx | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/components/components/column_collapsable.jsx b/app/assets/javascripts/components/components/column_collapsable.jsx index abd65d6337..8d74fd8a7a 100644 --- a/app/assets/javascripts/components/components/column_collapsable.jsx +++ b/app/assets/javascripts/components/components/column_collapsable.jsx @@ -45,7 +45,7 @@ const ColumnCollapsable = React.createClass({
- + {({ opacity, height }) =>
{children} diff --git a/app/assets/javascripts/components/components/icon_button.jsx b/app/assets/javascripts/components/components/icon_button.jsx index e9a7228e4d..f9b6192c04 100644 --- a/app/assets/javascripts/components/components/icon_button.jsx +++ b/app/assets/javascripts/components/components/icon_button.jsx @@ -1,4 +1,5 @@ import PureRenderMixin from 'react-addons-pure-render-mixin'; +import { Motion, spring } from 'react-motion'; const IconButton = React.createClass({ @@ -10,14 +11,16 @@ const IconButton = React.createClass({ active: React.PropTypes.bool, style: React.PropTypes.object, activeStyle: React.PropTypes.object, - disabled: React.PropTypes.bool + disabled: React.PropTypes.bool, + animate: React.PropTypes.bool }, getDefaultProps () { return { size: 18, active: false, - disabled: false + disabled: false, + animate: false }; }, @@ -49,9 +52,18 @@ const IconButton = React.createClass({ } return ( -