diff --git a/app/soapbox/components/material_status.js b/app/soapbox/components/material_status.js new file mode 100644 index 000000000..25fd24e05 --- /dev/null +++ b/app/soapbox/components/material_status.js @@ -0,0 +1,30 @@ +/** + * MaterialStatus: like a Status, but with gaps and rounded corners. + */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import StatusContainer from 'soapbox/containers/status_container'; + +export default class MaterialStatus extends React.Component { + + static propTypes = { + hidden: PropTypes.bool, + } + + render() { + // Performance: when hidden, don't render the wrapper divs + if (this.props.hidden) { + return ; + } + + return ( +
+
+ +
+
+ ); + } + +} diff --git a/app/soapbox/components/status_list.js b/app/soapbox/components/status_list.js index a4837a6c4..f96ec779f 100644 --- a/app/soapbox/components/status_list.js +++ b/app/soapbox/components/status_list.js @@ -3,7 +3,7 @@ import React from 'react'; import { FormattedMessage, defineMessages } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; -import StatusContainer from '../containers/status_container'; +import MaterialStatus from 'soapbox/components/material_status'; import ImmutablePureComponent from 'react-immutable-pure-component'; import LoadGap from './load_gap'; import ScrollableList from './scrollable_list'; @@ -117,7 +117,7 @@ export default class StatusList extends ImmutablePureComponent { onClick={onLoadMore} /> ) : ( - ( - ({ }); -export default @injectIntl -@connect(makeMapStateToProps, mapDispatchToProps) -class StatusContainer extends React.Component { - - render() { - return ( -
- -
- ); - } - -} +export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Status)); diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index 7fbb7af2f..2efd84e3b 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -126,15 +126,6 @@ vertical-align: middle; } -.status-container { - padding-bottom: 10px; -} - -.status__wrapper { - @include standard-panel; - padding: 15px 0 10px; -} - .status__wrapper--filtered { color: var(--primary-text-color); border: 0; @@ -719,3 +710,12 @@ a.status-card.compact:hover { } } } + +.material-status { + padding-bottom: 10px; + + &__status { + @include standard-panel; + padding: 15px 0 10px; + } +}