Skip to content

Commit 4592ad6

Browse files
authored
fix: Remove default props for deprecated props in Input (#455)
* fix(utils): remove stacktrace from deprecation warnings The stacktraces tend to be 20+ lines long and pollute the console. * fix(components): remove default classnames props from input These props are deprecated. Providing a default prop will always trigger the deprecation warning and might confuse users. Since the current default prop is just an empty string, it's redundant.
1 parent 72087a1 commit 4592ad6

File tree

9 files changed

+90
-93
lines changed

9 files changed

+90
-93
lines changed

src/components/AutoCompleteInput/__snapshots__/AutoCompleteInput.spec.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ exports[`AutoCompleteInput should render with default styles 1`] = `
6464
className="circuit-4 circuit-5"
6565
>
6666
<div
67-
className=" circuit-2 circuit-3"
67+
className="circuit-2 circuit-3"
6868
disabled={false}
6969
>
7070
<div>
@@ -76,7 +76,7 @@ exports[`AutoCompleteInput should render with default styles 1`] = `
7676
aria-expanded={false}
7777
aria-invalid={false}
7878
autoComplete="off"
79-
className=" circuit-0 circuit-1"
79+
className="circuit-0 circuit-1"
8080
disabled={false}
8181
id="downshift-0-input"
8282
onBlur={[Function]}

src/components/AutoCompleteTags/__snapshots__/AutoCompleteTags.spec.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ exports[`AutoCompleteTags should render with default styles 1`] = `
6464
className="circuit-4 circuit-5"
6565
>
6666
<div
67-
className=" circuit-2 circuit-3"
67+
className="circuit-2 circuit-3"
6868
disabled={false}
6969
>
7070
<div>
@@ -76,7 +76,7 @@ exports[`AutoCompleteTags should render with default styles 1`] = `
7676
aria-expanded={false}
7777
aria-invalid={false}
7878
autoComplete="off"
79-
className=" circuit-0 circuit-1"
79+
className="circuit-0 circuit-1"
8080
disabled={false}
8181
id="downshift-0-input"
8282
onBlur={[Function]}

src/components/CreditCardDetails/components/CardNumberInput/__snapshots__/CardNumberInput.spec.js.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ Array [
175175
}
176176
177177
<div
178-
class=" circuit-14 circuit-15"
178+
class="circuit-14 circuit-15"
179179
>
180180
<input
181181
aria-invalid="false"
182182
autocomplete="cc-number"
183-
class=" circuit-0 circuit-1"
183+
class="circuit-0 circuit-1"
184184
id="cui-cc-card-number"
185185
name="creditCardInput"
186186
placeholder="•••• •••• •••• ••••"
@@ -388,12 +388,12 @@ Array [
388388
}
389389
390390
<div
391-
class=" circuit-14 circuit-15"
391+
class="circuit-14 circuit-15"
392392
>
393393
<input
394394
aria-invalid="false"
395395
autocomplete="cc-number"
396-
class=" circuit-0 circuit-1"
396+
class="circuit-0 circuit-1"
397397
id="cui-cc-card-number"
398398
name="creditCardInput"
399399
placeholder="•••• •••• •••• ••••"
@@ -614,12 +614,12 @@ Array [
614614
}
615615
616616
<div
617-
class=" circuit-20 circuit-21"
617+
class="circuit-20 circuit-21"
618618
>
619619
<input
620620
aria-invalid="false"
621621
autocomplete="cc-number"
622-
class=" circuit-0 circuit-1"
622+
class="circuit-0 circuit-1"
623623
id="cui-cc-card-number"
624624
name="creditCardInput"
625625
placeholder="•••• •••• •••• ••••"

src/components/CurrencyInput/components/SimpleCurrencyInput/__snapshots__/SimpleCurrencyInput.spec.js.snap

+14-14
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ exports[`SimpleCurrencyInput should adjust input padding and postfix width to ma
7272
}
7373
7474
<div
75-
class=" circuit-4 circuit-5"
75+
class="circuit-4 circuit-5"
7676
>
7777
<input
7878
aria-invalid="false"
79-
class=" circuit-0 circuit-1"
79+
class="circuit-0 circuit-1"
8080
placeholder="123,45"
8181
type="text"
8282
/>
@@ -163,12 +163,12 @@ exports[`SimpleCurrencyInput should prioritize disabled over error styles 1`] =
163163
}
164164
165165
<div
166-
class=" circuit-4 circuit-5"
166+
class="circuit-4 circuit-5"
167167
disabled=""
168168
>
169169
<input
170170
aria-invalid="true"
171-
class=" circuit-0 circuit-1"
171+
class="circuit-0 circuit-1"
172172
disabled=""
173173
type="text"
174174
/>
@@ -299,11 +299,11 @@ exports[`SimpleCurrencyInput should prioritize disabled over warning styles 1`]
299299
}
300300
301301
<div
302-
class=" circuit-4 circuit-5"
302+
class="circuit-4 circuit-5"
303303
>
304304
<input
305305
aria-invalid="true"
306-
class=" circuit-0 circuit-1"
306+
class="circuit-0 circuit-1"
307307
type="text"
308308
/>
309309
<span
@@ -384,11 +384,11 @@ exports[`SimpleCurrencyInput should render with default styles 1`] = `
384384
}
385385
386386
<div
387-
class=" circuit-4 circuit-5"
387+
class="circuit-4 circuit-5"
388388
>
389389
<input
390390
aria-invalid="false"
391-
class=" circuit-0 circuit-1"
391+
class="circuit-0 circuit-1"
392392
type="text"
393393
/>
394394
<span
@@ -495,11 +495,11 @@ exports[`SimpleCurrencyInput should render with error styles 1`] = `
495495
}
496496
497497
<div
498-
class=" circuit-4 circuit-5"
498+
class="circuit-4 circuit-5"
499499
>
500500
<input
501501
aria-invalid="true"
502-
class=" circuit-0 circuit-1"
502+
class="circuit-0 circuit-1"
503503
type="text"
504504
/>
505505
<span
@@ -606,11 +606,11 @@ exports[`SimpleCurrencyInput should render with warning styles 1`] = `
606606
}
607607
608608
<div
609-
class=" circuit-4 circuit-5"
609+
class="circuit-4 circuit-5"
610610
>
611611
<input
612612
aria-invalid="false"
613-
class=" circuit-0 circuit-1"
613+
class="circuit-0 circuit-1"
614614
type="text"
615615
/>
616616
<span
@@ -693,7 +693,7 @@ exports[`SimpleCurrencyInput should support rendering symbols on the left 1`] =
693693
}
694694
695695
<div
696-
class=" circuit-4 circuit-5"
696+
class="circuit-4 circuit-5"
697697
>
698698
<span
699699
class="circuit-0 circuit-1"
@@ -702,7 +702,7 @@ exports[`SimpleCurrencyInput should support rendering symbols on the left 1`] =
702702
</span>
703703
<input
704704
aria-invalid="false"
705-
class=" circuit-2 circuit-3"
705+
class="circuit-2 circuit-3"
706706
placeholder="123.45"
707707
type="text"
708708
/>

src/components/Input/Input.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,7 @@ Input.defaultProps = {
461461
inline: false,
462462
noMargin: false,
463463
deepRef: undefined,
464-
textAlign: Input.LEFT,
465-
inputClassName: '',
466-
wrapperClassName: ''
464+
textAlign: Input.LEFT
467465
};
468466

469467
/**

0 commit comments

Comments
 (0)