bigbuffet-rw/app/soapbox/components/badge.tsx

14 lines
291 B
TypeScript
Raw Normal View History

2020-04-14 14:37:17 -07:00
import PropTypes from 'prop-types';
import React from 'react';
2020-03-27 13:59:38 -07:00
const Badge = (props: any) => (
2020-03-27 13:59:38 -07:00
<span className={'badge badge--' + props.slug}>{props.title}</span>
);
2020-04-14 14:37:17 -07:00
Badge.propTypes = {
title: PropTypes.string.isRequired,
slug: PropTypes.string.isRequired,
};
2020-03-27 13:59:38 -07:00
export default Badge;