Skip to content

Commit

Permalink
Fixing SubmitButton colours. Possibly from a bad rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
pablinos committed Mar 6, 2020
1 parent 3c15158 commit 30a52b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions extensions/shared/submit-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,17 @@ class SubmitButton extends Component {
render() {
const {
attributes,
backgroundButtonColor,
textButtonColor,
fallbackBackgroundColor,
fallbackTextColor,
setAttributes,
setBackgroundButtonColor,
setTextButtonColor,
} = this.props;

const backgroundColor = attributes.customBackgroundButtonColor || fallbackBackgroundColor;
const color = attributes.customTextButtonColor || fallbackTextColor;
const backgroundColor = backgroundButtonColor.color || fallbackBackgroundColor;
const color = textButtonColor.color || fallbackTextColor;
const buttonStyle = { border: 'none', backgroundColor, color };
const buttonClasses = getButtonClasses(
pick( this.attributes, [ 'backgroundButtonColor', 'textButtonColor' ] )
Expand Down Expand Up @@ -160,6 +162,7 @@ class SubmitButton extends Component {
] }
/>
<ContrastChecker
isLargeText={ false }
textColor={ color }
backgroundColor={ backgroundColor }
fallbackBackgroundColor
Expand Down

0 comments on commit 30a52b9

Please sign in to comment.