Skip to content

Commit fbcec79

Browse files
kubraturanabdurrahmanekr
authored andcommitted
add tooltip to button component (#74)
* add tooltip to button component * update README.md
1 parent 63f7b37 commit fbcec79

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ import { Button } from 'react-chat-elements'
296296
| disabled | none | string | button is disabled? |
297297
| text | none | string | button text |
298298
| buttonRef | none | function | button ref |
299+
| title | none | string | button title |
299300

300301
## Popup Component
301302

src/Button/Button.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export class Button extends Component {
88
return (
99
<button
1010
ref={this.props.buttonRef}
11+
title={this.props.title}
1112
className={classNames('rce-button', this.props.type, this.props.className)}
1213
style={{
1314
backgroundColor: this.props.backgroundColor,
@@ -41,6 +42,7 @@ Button.defaultProps = {
4142
color: 'white',
4243
className: null,
4344
buttonRef: null,
45+
title: null,
4446
};
4547

4648
export default Button;

0 commit comments

Comments
 (0)