From 45c44989c8fb6e24badd18bb83ac5f68de0aceaf Mon Sep 17 00:00:00 2001 From: kibigo! Date: Fri, 17 Nov 2017 19:11:18 -0800 Subject: Forking glitch theme --- .../themes/glitch/components/collapsable.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/javascript/themes/glitch/components/collapsable.js (limited to 'app/javascript/themes/glitch/components/collapsable.js') diff --git a/app/javascript/themes/glitch/components/collapsable.js b/app/javascript/themes/glitch/components/collapsable.js new file mode 100644 index 000000000..8bc0a54f4 --- /dev/null +++ b/app/javascript/themes/glitch/components/collapsable.js @@ -0,0 +1,22 @@ +import React from 'react'; +import Motion from 'themes/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; -- cgit