2021-10-06 12:39:39 -07:00
|
|
|
/**
|
|
|
|
* MaterialStatus: like a Status, but with gaps and rounded corners.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import PropTypes from 'prop-types';
|
2022-01-10 14:17:52 -08:00
|
|
|
import React from 'react';
|
2022-01-10 14:25:06 -08:00
|
|
|
|
2021-10-06 12:39:39 -07:00
|
|
|
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 <StatusContainer {...this.props} />;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2021-10-08 15:09:55 -07:00
|
|
|
<div className='material-status' tabIndex={-1}>
|
|
|
|
<div className='material-status__status focusable' tabIndex={0}>
|
|
|
|
<StatusContainer {...this.props} focusable={false} />
|
2021-10-06 12:39:39 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|