Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { MDCCheckboxFoundation } from '@material/checkbox';
import { componentFactory } from '@rmwc/base';
import { withRipple } from '@rmwc/ripple';
import {
ToggleableFoundationComponent,
ToggleableFoundationProps
} from '@rmwc/toggleable';
/**
* This is an awful freaking bugfix
* Basically, MDC decided that patching the native getter and setter
* on a checkbox would be fun which consequently kills Reacts ability
* to do the same.
*/
// @ts-ignore
MDCCheckboxFoundation.prototype.installPropertyChangeHooks_ = () => {};
/** A Checkbox component. */
export interface CheckboxProps
extends RMWC.WithRippleProps,
ToggleableFoundationProps {
/** Make the control indeterminate */
indeterminate?: boolean;
}
const CheckboxRoot = withRipple({
surface: false,
unbounded: true
})(
componentFactory({
displayName: 'CheckboxRoot',
classNames: (props: CheckboxProps) => [