import React, { forwardRef } from 'react';
import { Checkbox } from 'antd'
import { CheckboxProps } from 'antd/lib/checkbox'
import classNames from 'classnames';

interface CheckboxGroup {
    checked?: boolean,
    className?: string,
    [propsName: string]: any,
}

export const CheckboxButton: React.FC<CheckboxGroup & CheckboxProps> = forwardRef(({ className, ...checkboxProps }, ref) => {
    return (
        <Checkbox
            ref={ref as any}
            className={classNames('jad-checkbox-button-wrap', className)}
            {...checkboxProps}
        />
    )
})
