2021-10-11 12:00:59 -07:00
|
|
|
import PropTypes from 'prop-types';
|
2022-01-10 14:17:52 -08:00
|
|
|
import React from 'react';
|
2021-10-11 12:00:59 -07:00
|
|
|
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);
|
|
|
|
|
2021-12-18 07:26:26 -08:00
|
|
|
return (
|
2021-10-12 12:00:01 -07:00
|
|
|
<div className='status__content status__content--placeholder' tabIndex='0' key='content'>
|
2021-10-11 12:00:59 -07:00
|
|
|
{generateText(length)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|