diff --git a/app/javascript/mastodon/components/column_collapsable.js b/app/javascript/mastodon/components/column_collapsable.js index 3154c977fa..a54f76932a 100644 --- a/app/javascript/mastodon/components/column_collapsable.js +++ b/app/javascript/mastodon/components/column_collapsable.js @@ -1,5 +1,4 @@ import React from 'react'; -import { Motion, spring } from 'react-motion'; import PropTypes from 'prop-types'; class ColumnCollapsable extends React.PureComponent { @@ -29,21 +28,16 @@ class ColumnCollapsable extends React.PureComponent { render () { const { icon, title, fullHeight, children } = this.props; const { collapsed } = this.state; - const collapsedClassName = collapsed ? 'collapsable-collapsed' : 'collapsable'; return ( -
-
+
+
- - {({ opacity, height }) => -
- {children} -
- } -
+
+ {children} +
); } diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 4de8b7969c..3c90ae7285 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -48,6 +48,32 @@ .column-collapsable { position: relative; + + .column-collapsable__content { + overflow: auto; + transition: 300ms ease; + opacity: 1; + } + + &.collapsed .column-collapsable__content { + height: 0 !important; + opacity: 0; + } + + .column-collapsable__button { + color: $primary-text-color; + background: lighten($ui-base-color, 8%); + + &:hover { + color: $primary-text-color; + background: lighten($ui-base-color, 8%); + } + } + + &.collapsed .column-collapsable__button { + color: $ui-primary-color; + background: lighten($ui-base-color, 4%); + } } .column-icon { @@ -1984,21 +2010,6 @@ button.icon-button.active i.fa-retweet { text-align: center; } -.collapsable-collapsed { - color: $ui-primary-color; - background: lighten($ui-base-color, 4%); -} - -.collapsable { - color: $primary-text-color; - background: lighten($ui-base-color, 8%); - - &:hover { - color: $primary-text-color; - background: lighten($ui-base-color, 8%); - } -} - .video-error-cover { align-items: center; background: $base-overlay-background;