Skip to content

Commit

Permalink
Merge 3f37201 into 58d89fd
Browse files Browse the repository at this point in the history
  • Loading branch information
kchu1337 authored Jan 7, 2019
2 parents 58d89fd + 3f37201 commit f243bba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions packages/matchbox/src/components/TextField/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ class TextField extends Component {

const { paddingLeft, paddingRight } = this.state;

const setClasses = classnames(
styles.TextField,
error && styles.error
const setInputClasses = classnames(
styles.Input,
error && styles.Error
);

const requiredIndicator = required
Expand Down Expand Up @@ -134,7 +134,7 @@ class TextField extends Component {
onFocus,
onBlur,
onChange,
className: styles.Input,
className: setInputClasses,
style: { paddingLeft, paddingRight, resize }
// 'aria-describedby':
// 'aria-labelledby':
Expand All @@ -150,7 +150,7 @@ class TextField extends Component {
: input;

return (
<fieldset className={setClasses}>
<fieldset className={styles.TextField}>
{label && !labelHidden && labelMarkup}
<Connect left={connectLeft} right={connectRight}>
{inputMarkup}
Expand Down
10 changes: 5 additions & 5 deletions packages/matchbox/src/components/TextField/TextField.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
}
}

.error .Input {
border: 1px solid color(red);
background: rgba(color(red, dark), 0.06);
}

.InlineError {
padding-left: spacing(small);
}
Expand All @@ -39,6 +34,11 @@

transition: border 0.15s;

&.Error {
border: 1px solid color(red);
background: rgba(color(red, dark), 0.06);
}

&:focus {
border: 1px solid color(blue);
box-shadow: 0 0 0 1px color(blue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ exports[`TextField renders TextField disabled 1`] = `

exports[`TextField renders TextField error 1`] = `
<fieldset
className="TextField error"
className="TextField"
>
<Connect>
<input
className="Input"
className="Input Error"
style={
Object {
"paddingLeft": undefined,
Expand All @@ -46,11 +46,11 @@ exports[`TextField renders TextField error 1`] = `

exports[`TextField renders TextField errorInLabel 1`] = `
<fieldset
className="TextField error"
className="TextField"
>
<Connect>
<input
className="Input"
className="Input Error"
style={
Object {
"paddingLeft": undefined,
Expand Down

0 comments on commit f243bba

Please sign in to comment.