From 358e3a4c3269b9da333a88d7ff886faf685277b4 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 27 Jul 2018 19:52:16 +0200 Subject: Get rid of Collapsable, use CSS instead Change inspired by 691107263c5e05973f9af9e1937abbc27430f54e --- .../flavours/glitch/components/collapsable.js | 22 ---------------------- .../glitch/features/composer/spoiler/index.js | 12 +++--------- .../glitch/styles/components/composer.scss | 13 +++++++++++++ 3 files changed, 16 insertions(+), 31 deletions(-) delete mode 100644 app/javascript/flavours/glitch/components/collapsable.js diff --git a/app/javascript/flavours/glitch/components/collapsable.js b/app/javascript/flavours/glitch/components/collapsable.js deleted file mode 100644 index 0e8b04033..000000000 --- a/app/javascript/flavours/glitch/components/collapsable.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import Motion from 'flavours/glitch/util/optional_motion'; -import spring from 'react-motion/lib/spring'; -import PropTypes from 'prop-types'; - -const Collapsable = ({ fullHeight, isVisible, children }) => ( - - {({ opacity, height }) => - (
- {children} -
) - } -
-); - -Collapsable.propTypes = { - fullHeight: PropTypes.number.isRequired, - isVisible: PropTypes.bool.isRequired, - children: PropTypes.node.isRequired, -}; - -export default Collapsable; diff --git a/app/javascript/flavours/glitch/features/composer/spoiler/index.js b/app/javascript/flavours/glitch/features/composer/spoiler/index.js index a49b0e10f..d0e74b957 100644 --- a/app/javascript/flavours/glitch/features/composer/spoiler/index.js +++ b/app/javascript/flavours/glitch/features/composer/spoiler/index.js @@ -3,9 +3,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, FormattedMessage } from 'react-intl'; -// Components. -import Collapsable from 'flavours/glitch/components/collapsable'; - // Utils. import { assignHandlers, @@ -59,11 +56,8 @@ export default class ComposerSpoiler extends React.PureComponent { // The result. return ( - -