Skip to content

Commit d771cd8

Browse files
committed
Revert "fix(InputGroup, NumericInput): Add back compat for size prop"
This reverts commit 9f1c089.
1 parent 9f1c089 commit d771cd8

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

packages/core/src/common/classes.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import type { ButtonVariant } from "./buttonVariant";
1919
import { Elevation } from "./elevation";
2020
import { Intent } from "./intent";
2121
import { Position } from "./position";
22-
import type { HTMLInputProps } from "./props";
2322
import type { Size } from "./size";
2423

2524
// injected by webpack.DefinePlugin
@@ -449,12 +448,9 @@ export function positionClass(position: Position | undefined) {
449448
}
450449

451450
export function sizeClass(
452-
size: Size | HTMLInputProps["size"],
451+
size: Size,
453452
legacyProps: Partial<Record<"large" | "small", boolean>>,
454453
): string | Record<string, boolean> {
455-
if (typeof size === "number") {
456-
return {};
457-
}
458454
if (size === "small") {
459455
return SMALL;
460456
}

packages/core/src/components/forms/inputGroup.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ export interface InputGroupProps
6363
small?: boolean;
6464

6565
/**
66-
* Size of the input. If given a numeric value, and `inputSize` is not defined, then this will be provided as the
67-
* `size` attribute for the underyling native HTML input element. Passing a numeric value this way is deprecated,
68-
* use the `inputSize` prop instead.
66+
* Size of the input.
6967
*
7068
* @default "medium"
7169
*/
72-
size?: Size | HTMLInputProps["size"];
70+
size?: Size;
7371

7472
/**
7573
* Alias for the native HTML input `size` attribute.
@@ -163,7 +161,7 @@ export class InputGroup extends AbstractPureComponent<InputGroupProps, InputGrou
163161
"aria-disabled": disabled,
164162
className: classNames(Classes.INPUT, inputClassName),
165163
onChange: this.handleInputChange,
166-
size: inputSize ?? (typeof size === "number" ? size : undefined),
164+
size: inputSize,
167165
style,
168166
} satisfies React.HTMLProps<HTMLInputElement>;
169167
const inputElement = asyncControl ? (

packages/core/src/components/forms/numericInput.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,11 @@ export interface NumericInputProps extends InputSharedProps {
155155
small?: boolean;
156156

157157
/**
158-
* Size of the input. If given a numeric value, and `inputSize` is not defined, then this will be provided as the
159-
* `size` attribute for the underyling native HTML input element. Passing a numeric value this way is deprecated,
160-
* use the `inputSize` prop instead.
158+
* The size of the input.
161159
*
162160
* @default "medium"
163161
*/
164-
size?: Size | HTMLInputProps["size"];
162+
size?: Size;
165163

166164
/**
167165
* Alias for the native HTML input `size` attribute.

0 commit comments

Comments
 (0)