2020-08-17 21:07:16 +01:00
|
|
|
import React from 'react'
|
2020-08-17 21:59:29 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2020-07-28 21:06:45 +01:00
|
|
|
import { CX } from '../../constants'
|
|
|
|
import { getRandomInt } from '../../utils/numbers'
|
|
|
|
import PlaceholderLayout from './placeholder_layout'
|
|
|
|
|
2020-08-17 21:07:16 +01:00
|
|
|
export default class CommentPlaceholder extends React.PureComponent {
|
2020-07-28 21:06:45 +01:00
|
|
|
|
|
|
|
render() {
|
|
|
|
const classes = CX({
|
2020-08-18 21:49:11 +01:00
|
|
|
d: 1,
|
2020-07-28 21:06:45 +01:00
|
|
|
px15: 1,
|
|
|
|
py10: 1,
|
|
|
|
})
|
|
|
|
|
|
|
|
const width = getRandomInt(200, 350)
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={classes}>
|
|
|
|
<PlaceholderLayout viewBox='0 0 400 52'>
|
|
|
|
<rect x='27' y='0' rx='4' ry='4' width={width} height='40' />
|
|
|
|
<circle cx='10' cy='11' r='10' />
|
|
|
|
<rect x='30' y='45' rx='4' ry='4' width='24' height='6' />
|
|
|
|
<rect x='62' y='45' rx='4' ry='4' width='28' height='6' />
|
|
|
|
<rect x='98' y='45' rx='4' ry='4' width='18' height='6' />
|
|
|
|
</PlaceholderLayout>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|