Skip to content

Commit

Permalink
fix(Input): add conditional spacing for inputSize
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Biggs authored and bfbiggs committed Jun 19, 2019
1 parent ac2521b commit 5f9b6e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion react/src/lib/Input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Input extends React.Component {
<div
className={
`md-input-group` +
` ${inputSize}` +
`${inputSize ? ` ${inputSize}` : ''}` +
`${inputSize ? ' columns' : ''}` +
`${readOnly ? ' read-only' : ''}` +
`${disabled ? ' disabled' : ''}` +
Expand Down
30 changes: 20 additions & 10 deletions react/src/lib/Input/tests/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -85,6 +85,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -152,7 +153,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -161,6 +162,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -306,7 +308,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -315,6 +317,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -415,7 +418,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -424,6 +427,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -592,7 +596,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -601,6 +605,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -664,7 +669,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -673,6 +678,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -810,7 +816,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -819,6 +825,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -882,7 +889,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -891,6 +898,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -1028,7 +1036,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -1037,6 +1045,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down Expand Up @@ -1100,7 +1109,7 @@ ShallowWrapper {
"",
Array [],
],
"className": "md-input-group ",
"className": "md-input-group",
},
"ref": null,
"rendered": Array [
Expand All @@ -1109,6 +1118,7 @@ ShallowWrapper {
"key": undefined,
"nodeType": "function",
"props": Object {
"children": null,
"className": "md-label",
"htmlFor": "1",
"label": "test",
Expand Down

0 comments on commit 5f9b6e0

Please sign in to comment.