2019-09-12 18:03:19 +02:00
|
|
|
import * as React from 'react';
|
2022-06-05 11:40:43 +02:00
|
|
|
import I18n from 'i18n-js';
|
2019-09-12 18:03:19 +02:00
|
|
|
|
2019-09-26 11:00:32 +02:00
|
|
|
interface Props {
|
|
|
|
|
name: string;
|
|
|
|
|
color: string;
|
|
|
|
|
}
|
2019-09-12 18:03:19 +02:00
|
|
|
|
|
|
|
|
const PostStatusLabel = ({
|
|
|
|
|
name,
|
|
|
|
|
color,
|
2019-09-26 11:00:32 +02:00
|
|
|
}: Props) => (
|
2022-05-28 11:03:36 +02:00
|
|
|
<span className="badge" style={{backgroundColor: color || 'black', color: 'white'}}>
|
2022-06-05 11:40:43 +02:00
|
|
|
{(name || I18n.t('common.no_status')).toUpperCase()}
|
2022-04-07 18:58:18 +02:00
|
|
|
</span>
|
2019-09-12 18:03:19 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default PostStatusLabel;
|