How to use the @chakra-ui/utils.omit function in @chakra-ui/utils

To help you get started, we’ve selected a few @chakra-ui/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chakra-ui / chakra-ui / packages / chakra-ui / src / CheckboxGroup / CheckboxGroup.tsx View on Github external
{cloneElement(child as React.ReactElement, {
          size: size,
          variantColor: variantColor,
          onChange: () => checkboxGroup.onChange(child.props.value),
          isChecked: checkboxGroup.value.includes(child.props.value),
        })}
      
    );
  });

  // Omit incompatible values
  const finalProps = omit(props, ["defaultValue", "value", "onChange"]);

  return (
    
      {clones}
    
  );
};
github chakra-ui / chakra-ui / packages / chakra-ui / src / RadioGroup / RadioGroup.tsx View on Github external
if (!input) {
            input = rootRef.current.querySelector(
              "input:not(:disabled), [role=radio]:not([aria-disabled=true])",
            );
          }

          if (input) {
            (input as HTMLInputElement).focus();
          }
        },
      }),
      [],
    );

    const finalProps = omit(props, [
      "defaultValue",
      "value",
      "onChange",
      "name",
    ]);

    return (
      
        {clones}
      
    );
  },
);