bigbuffet-rw/app/soapbox/features/placeholder/components/placeholder_status_content.js
marcin mikołajczak 6cc20ff42a PendingStatus: display placeholder attachments
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-12-19 00:11:14 +01:00

23 lines
611 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { randomIntFromInterval, generateText } from '../utils';
export default class PlaceholderStatusContent extends React.Component {
static propTypes = {
maxLength: PropTypes.number.isRequired,
minLength: PropTypes.number.isRequired,
}
render() {
const { maxLength, minLength } = this.props;
const length = randomIntFromInterval(maxLength, minLength);
return (
<div className='status__content status__content--placeholder' tabIndex='0' key='content'>
{generateText(length)}
</div>
);
}
}