Add cron status to admin help section
[MAILPOET-1457]
This commit is contained in:
26
assets/js/src/common/print_boolean.jsx
Normal file
26
assets/js/src/common/print_boolean.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
|
||||
const PrintBoolean = props => (
|
||||
<span>
|
||||
{(props.children === true && props.truthy) ||
|
||||
(props.children === false && props.falsy) ||
|
||||
(props.unknown)}
|
||||
</span>
|
||||
);
|
||||
|
||||
PrintBoolean.propTypes = {
|
||||
truthy: React.PropTypes.string,
|
||||
falsy: React.PropTypes.string,
|
||||
unknown: React.PropTypes.string,
|
||||
children: React.PropTypes.bool,
|
||||
};
|
||||
|
||||
PrintBoolean.defaultProps = {
|
||||
truthy: MailPoet.I18n.t('yes'),
|
||||
falsy: MailPoet.I18n.t('no'),
|
||||
unknown: MailPoet.I18n.t('unknown'),
|
||||
children: null,
|
||||
};
|
||||
|
||||
module.exports = PrintBoolean;
|
Reference in New Issue
Block a user