bigbuffet-rw/app/soapbox/features/placeholder/components/placeholder_display_name.js

24 lines
663 B
JavaScript
Raw Normal View History

import PropTypes from 'prop-types';
import React from 'react';
import { randomIntFromInterval, generateText } from '../utils';
2022-03-21 11:09:01 -07:00
const PlaceholderDisplayName = ({ minLength, maxLength }) => {
const length = randomIntFromInterval(maxLength, minLength);
const acctLength = randomIntFromInterval(maxLength, minLength);
2022-03-21 11:09:01 -07:00
return (
2022-03-23 17:18:37 -07:00
<div className='flex flex-col text-slate-200 dark:text-slate-700'>
2022-03-21 11:09:01 -07:00
<p>{generateText(length)}</p>
<p>{generateText(acctLength)}</p>
</div>
);
};
2022-03-21 11:09:01 -07:00
PlaceholderDisplayName.propTypes = {
maxLength: PropTypes.number.isRequired,
minLength: PropTypes.number.isRequired,
};
2022-03-21 11:09:01 -07:00
export default PlaceholderDisplayName;