title | cssPrefix | typescript | propComponents | |
---|---|---|---|---|
NotificationBadge |
pf-c-notification-badge |
true |
|
import { NotificationBadge } from '@patternfly/react-core'; import { BellIcon } from '@patternfly/react-icons';
import React from 'react';
import { NotificationBadge } from '@patternfly/react-core';
import { BellIcon } from '@patternfly/react-icons';
class SimpleNotificationBadge extends React.Component {
constructor(props) {
super(props);
this.state = {
isRead: false
};
this.onClick = () => {
this.setState({
isRead: true
});
};
}
render() {
const { isRead } = this.state;
return (
<NotificationBadge isRead={isRead} onClick={this.onClick} aria-label="Notifications">
<BellIcon />
</NotificationBadge>
);
}
}