Add common tag PropTypes (#5882)

This commit is contained in:
Nick Taylor 2020-02-05 17:38:43 -05:00 committed by GitHub
parent 71e1c8d3e6
commit 261a4f9efa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,4 @@
export * from './user-prop-types';
export * from './default-children-prop-types';
export * from './organization-prop-type';
export * from './tag-prop-types';

View file

@ -0,0 +1,10 @@
import PropTypes from 'prop-types';
export const tagPropTypes = PropTypes.shape({
id: PropTypes.number.isRequired,
name: PropTypes.string.isRequired,
hotness_score: PropTypes.number.isRequired,
points: PropTypes.number.isRequired,
bg_color_hex: PropTypes.string.isRequired,
text_color_hex: PropTypes.string.isRequired,
});