Skip to content

Added disabled property to send button#1922

Merged
corinagum merged 3 commits intomicrosoft:masterfrom
tdurnford:1920
Apr 24, 2019
Merged

Added disabled property to send button#1922
corinagum merged 3 commits intomicrosoft:masterfrom
tdurnford:1920

Conversation

@tdurnford
Copy link
Copy Markdown
Contributor

@tdurnford tdurnford commented Apr 23, 2019

Fixes #1920

Added the disabled property to the send button, so the 'sendBoxButtonColorOnDisabled' default style applies to the button when Web Chat is disabled.

Example Code

  render() {

    const styleOptions = { 
      sendBoxButtonColorOnDisabled: 'blue'
    }
    
    return (
      this.state.directLine
        ? <ReactWebChat
          className="chat"
          disabled={true}
          directLine={ this.state.directLine }
          styleOptions={ styleOptions }
          { ...this.props }
        />
        :<div>Connecting to bot&hellip;</div>
    );
  }

Screenshot
disabled-ui-js-tests-the-ui-of-disabled-web-chat-change-default-disabled-button-color-1-snap

@tdurnford tdurnford requested a review from corinagum April 23, 2019 20:55
Comment thread __tests__/disabledUI.js Outdated
@tdurnford tdurnford marked this pull request as ready for review April 23, 2019 21:11
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 23, 2019

Coverage Status

Coverage remained the same at 54.05% when pulling 308d484 on tdurnford:1920 into 9cbbea2 on Microsoft:master.

Copy link
Copy Markdown
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@corinagum corinagum merged commit b836b6e into microsoft:master Apr 24, 2019
@tdurnford tdurnford deleted the 1920 branch June 3, 2019 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SendButton should pass disabled attribute to IconButton

3 participants