-
Notifications
You must be signed in to change notification settings - Fork 2
Message
brandonk1234 edited this page Sep 6, 2016
·
1 revision
The message component would be best used when building a chat/messaging app. The component has a number of options and props that you can add to it.
The props needed for this component are listed and explained below:
-
title
- This prop must be astring
-
body
- This prop must be astring
-
onClick
- This prop must be afunction
-
avatar
- This prop must be astring
-
onCloseButtonClicked
- This prop must be afunction
-
icon
- This prop must be astring
-
iconColor
- This prop must be astring
-
author
- This prop must be astring
<Message
title="Brandon Karunakaran"
body="Brandon recieved a message from the message/notification ui element"
onClick={this.onClick}
avatar="http://placehold.it/400x100"
onCloseButtonClicked={this.onCloseButtonClicked}
icon="alarm"
iconColor="red"
author="brandon Karunakaran"
/>
// ...React Component
onClick: function() {
console.log('this component has been clicked')
},
onCloseButtonClicked: function() {
console.log('the close button has been clicked')
},