tooot/src/prop-types/attachment.js

20 lines
487 B
JavaScript
Raw Normal View History

2020-10-30 00:10:25 +01:00
import PropTypes from 'prop-types'
const propTypesAttachment = PropTypes.shape({
// Base
id: PropTypes.string.isRequired,
type: PropTypes.oneOf(['unknown', 'image', 'gifv', 'video', 'audio'])
.isRequired,
url: PropTypes.string.isRequired,
2020-10-31 02:22:08 +01:00
preview_url: PropTypes.string,
2020-10-30 00:10:25 +01:00
// Others
remote_url: PropTypes.string,
text_url: PropTypes.string,
meta: PropTypes.object,
description: PropTypes.string,
blurhash: PropTypes.string
})
export default propTypesAttachment