mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-01 05:31:49 -05:00
Integrate proptypes for our shared components.
- Fix unit tests. - Fix linter errors.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { I18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import {
|
||||
@@ -20,7 +21,6 @@ class NotificationListItem extends React.Component {
|
||||
errorTurnedOn,
|
||||
toggleNotification
|
||||
} = this.props;
|
||||
|
||||
const capText = {
|
||||
textTransform: 'capitalize'
|
||||
};
|
||||
@@ -69,5 +69,21 @@ class NotificationListItem extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
NotificationListItem.propTypes = {
|
||||
detailUrl: PropTypes.string.isRequired,
|
||||
errorTurnedOn: PropTypes.bool,
|
||||
itemId: PropTypes.number.isRequired,
|
||||
name: PropTypes.string,
|
||||
notificationType: PropTypes.string.isRequired,
|
||||
successTurnedOn: PropTypes.bool,
|
||||
toggleNotification: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
NotificationListItem.defaultProps = {
|
||||
errorTurnedOn: false,
|
||||
name: null,
|
||||
successTurnedOn: false,
|
||||
};
|
||||
|
||||
export default NotificationListItem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user