From 8098effc09d0cc3b6799182f74e1f3e0f87384c8 Mon Sep 17 00:00:00 2001 From: p-sw Date: Tue, 28 May 2024 22:21:57 +0900 Subject: [PATCH] refactor: use extracted & compressed instead of safe & unsafe --- packages/react/components/Input.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/react/components/Input.tsx b/packages/react/components/Input.tsx index 4a45aa6..73a6a04 100644 --- a/packages/react/components/Input.tsx +++ b/packages/react/components/Input.tsx @@ -48,14 +48,15 @@ interface InputFrameProps const InputFrame = React.forwardRef( (props, ref) => { - const [variantProps, otherPropsUnsafe] = resolveInputVariantProps(props); - const { children, ...otherPropsSafe } = otherPropsUnsafe; + const [variantProps, otherPropsCompressed] = + resolveInputVariantProps(props); + const { children, ...otherPropsExtracted } = otherPropsCompressed; return ( @@ -85,8 +86,8 @@ interface InputProps } const Input = React.forwardRef((props, ref) => { - const [variantProps, otherPropsUnsafe] = resolveInputVariantProps(props); - const { type, invalid, ...otherPropsSafe } = otherPropsUnsafe; + const [variantProps, otherPropsCompressed] = resolveInputVariantProps(props); + const { type, invalid, ...otherPropsExtracted } = otherPropsCompressed; const innerRef = React.useRef(null); @@ -108,7 +109,7 @@ const Input = React.forwardRef((props, ref) => { } }} className={inputVariant(variantProps)} - {...otherPropsSafe} + {...otherPropsExtracted} /> ); });