Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added disabled property to send button #1922

Merged
merged 3 commits into from
Apr 24, 2019
Merged

Conversation

tdurnford
Copy link
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

__tests__/disabledUI.js Outdated Show resolved Hide resolved
@tdurnford tdurnford marked this pull request as ready for review April 23, 2019 21:11
@coveralls
Copy link

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
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