Files
astuto/app/javascript/components/shared/PostStatusLabel.tsx

18 lines
363 B
TypeScript
Raw Normal View History

2019-09-12 18:03:19 +02:00
import * as React from 'react';
import I18n from 'i18n-js';
2019-09-12 18:03:19 +02:00
interface Props {
name: string;
color: string;
}
2019-09-12 18:03:19 +02:00
const PostStatusLabel = ({
name,
color,
}: Props) => (
<span className="badge" style={{backgroundColor: color || 'black', color: 'white'}}>
{(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;