Skip to content

Commit ad89e2c

Browse files
Merge pull request #11 from netsyno/master
Allow to override the placeholder text
2 parents 2cd0841 + 2e60350 commit ad89e2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ChatBot.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ class ChatBot extends Component {
446446
footerStyle,
447447
inputStyle,
448448
className,
449+
placeholder,
449450
} = this.props;
450451

451452
const header = headerComponent || (
@@ -501,7 +502,7 @@ class ChatBot extends Component {
501502
type="textarea"
502503
style={inputStyle}
503504
className="rsc-input"
504-
placeholder="Type the message ..."
505+
placeholder={placeholder}
505506
onKeyPress={this.handleKeyPress}
506507
onChange={this.onValueChange}
507508
value={inputValue}
@@ -539,9 +540,11 @@ ChatBot.propTypes = {
539540
userAvatar: PropTypes.string,
540541
userDelay: PropTypes.number,
541542
handleEnd: PropTypes.func,
543+
placeholder: PropTypes.string,
542544
};
543545

544546
ChatBot.defaultProps = {
547+
placeholder: 'Type the message ...',
545548
handleEnd: undefined,
546549
headerComponent: undefined,
547550
headerTitle: 'Chat',

0 commit comments

Comments
 (0)