Detailed status view scrollable
This commit is contained in:
@ -4,7 +4,8 @@ import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
const MediaGallery = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
media: ImmutablePropTypes.list.isRequired
|
||||
media: ImmutablePropTypes.list.isRequired,
|
||||
height: React.PropTypes.number.isRequired
|
||||
},
|
||||
|
||||
mixins: [PureRenderMixin],
|
||||
@ -63,7 +64,7 @@ const MediaGallery = React.createClass({
|
||||
});
|
||||
|
||||
return (
|
||||
<div style={{ marginTop: '8px', overflow: 'hidden', width: '100%', height: '110px', boxSizing: 'border-box' }}>
|
||||
<div style={{ marginTop: '8px', overflow: 'hidden', width: '100%', height: `${this.props.height}px`, boxSizing: 'border-box' }}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
@ -69,7 +69,7 @@ const Status = React.createClass({
|
||||
if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
|
||||
media = <VideoPlayer media={status.getIn(['media_attachments', 0])} />;
|
||||
} else {
|
||||
media = <MediaGallery media={status.get('media_attachments')} />;
|
||||
media = <MediaGallery media={status.get('media_attachments')} height={110} />;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user