Skip to content

Commit b6303d5

Browse files
committed
Remove inferred sizing for the spinner
1 parent 115e28b commit b6303d5

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/chakra-components/control.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import type {
1515
IndicatorSeparatorProps,
1616
LoadingIndicatorProps,
1717
} from "react-select";
18-
import type { SizeProps } from "../types";
19-
import { useSize } from "../utils";
2018
import { ChevronDownIcon, CloseIcon } from "./icons";
2119

2220
export const Control = <
@@ -241,23 +239,15 @@ export const LoadingIndicator = <
241239
className,
242240
cx,
243241
innerProps,
244-
selectProps: { chakraStyles, size: sizeProp },
242+
selectProps: { chakraStyles },
245243
color,
246244
colorPalette,
247245
trackColor,
248246
animationDuration,
249247
borderWidth,
250-
spinnerSize: propsSpinnerSize,
248+
spinnerSize,
251249
} = props;
252250

253-
const size = useSize(sizeProp);
254-
const spinnerSizes: SizeProps<"sm" | "md" | "lg" | "xl" | "xs"> = {
255-
sm: "xs",
256-
md: "sm",
257-
lg: "md",
258-
};
259-
const spinnerSize = spinnerSizes[size];
260-
261251
const initialCss: SystemStyleObject = {
262252
marginRight: 3,
263253
...(trackColor ? { "--spinner-track-color": trackColor } : {}),
@@ -278,7 +268,7 @@ export const LoadingIndicator = <
278268
)}
279269
css={css}
280270
{...innerProps}
281-
size={propsSpinnerSize || spinnerSize}
271+
size={spinnerSize}
282272
colorPalette={colorPalette}
283273
color={color}
284274
animationDuration={animationDuration}

0 commit comments

Comments
 (0)