Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
added some proptypes (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleyva authored Dec 18, 2018
1 parent 405a6bf commit 6e1aa36
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/components/Notification/Notification.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '../../styles/components/notification.css'
import PropTypes from 'prop-types'
import React from 'react'
import { Popup } from 'semantic-ui-react'
import NotificationBadge from './NotificationBadge'
Expand Down Expand Up @@ -71,4 +72,37 @@ Notification.Body = NotificationBody
Notification.Footer = NotificationFooter
Notification.Empty = NotificationEmpty

Notification.propTypes = {
/**
* Called when a notification message is clicked. Opens
* Detail View and displays notification message.
* @param {Object} notification message
*/
onNotificationClicked: PropTypes.func.isRequired.isRequired,
/**
* Called when a back button is clicked. Returns to
* List View.
*/
onBackClicked: PropTypes.func.isRequired,
/**
* Called when a Clear Notification button is clicked. Clears
* Notication Message from List View and archives it.
* @param {Object} notification message
*/
onClearNotification: PropTypes.func.isRequired,
/**
* Called when a Clear All button is clicked. Clears all
* Notication Message from List View and archives all.
*/
onClearAll: PropTypes.func.isRequired,
/**
* Set selected notification to view.
*/
selectedNotification: PropTypes.string,
/**
* Set notification data.
*/
notifications: PropTypes.object.isRequired
}

export default Notification

0 comments on commit 6e1aa36

Please sign in to comment.