Skip to content

Commit 77c6764

Browse files
committed
GH-20: Sanitize varname and add a comment
1 parent dad75ff commit 77c6764

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {getStatusClassNames} from "antd/lib/_util/statusUtils";
77
import InputLegacy from "./legacy";
88
import {PhoneInputProps} from "./types";
99

10-
const PhoneInput = (InputLegacyProps: PhoneInputProps) => {
10+
const PhoneInput = (inputLegacyProps: PhoneInputProps) => {
1111
const {token} = theme.useToken();
1212
const {status}: any = useContext(FormItemInputContext);
1313
const [_1, inputCls] = genComponentStyleHook("ant-input");
@@ -20,6 +20,7 @@ const PhoneInput = (InputLegacyProps: PhoneInputProps) => {
2020
const dropdownClass = useMemo(() => "ant-dropdown " + dropdownCls, [dropdownCls]);
2121

2222
useEffect(() => {
23+
/** Load antd 5.x styles dynamically observing the theme change */
2324
for (let styleSheet of document.styleSheets) {
2425
let rule: any;
2526
for (rule of styleSheet.cssRules || styleSheet.rules) {
@@ -62,7 +63,7 @@ const PhoneInput = (InputLegacyProps: PhoneInputProps) => {
6263

6364
return (
6465
<InputLegacy
65-
{...InputLegacyProps}
66+
{...inputLegacyProps}
6667
inputClass={inputClass}
6768
dropdownClass={dropdownClass}
6869
/>

0 commit comments

Comments
 (0)