diff --git a/src/components/Common/Input.js b/src/components/Common/Input.js index 2f78d81..6282c80 100644 --- a/src/components/Common/Input.js +++ b/src/components/Common/Input.js @@ -53,7 +53,7 @@ export function FormInput(props) { } export function FormInputSelection(props) { - const { data: [name, val], onRemove, onFormClick } = props + const { data: [name, val], onRemove, onClick, ...restProps } = props return ( @@ -64,19 +64,24 @@ export function FormInputSelection(props) { type={"text"} value={val} readOnly={true} - {...props} + {...restProps} bg={"gray.100"} - onClick={onFormClick} + onClick={onClick} /> {onRemove && val ? ( - } onClick={onRemove} - {...props} + {...restProps} /> - ) : - ( } {...props}/> ) + ) : ( + } + onClick={onClick} + {...restProps} + /> + ) } diff --git a/src/views/products/Create.js b/src/views/products/Create.js index 2a82a01..f551aae 100644 --- a/src/views/products/Create.js +++ b/src/views/products/Create.js @@ -75,7 +75,7 @@ export default function Create(props) { toggle()} + onClick={() => toggle()} />