import classNames from 'classnames';
import { PayPalCheckbox, PayPalRdb } from './index';
const SelectableContent = ( {
title,
description,
type = 'checkbox',
children,
name,
value,
changeCallback,
currentValue,
checked = null,
} ) => {
let isSelected;
if ( Array.isArray( currentValue ) ) {
isSelected = currentValue.includes( value );
} else {
isSelected = value === currentValue;
}
const boxClassName = classNames( 'ppcp-r-select-box', {
'ppcp--selected': isSelected,
} );
const InputField = ( { isRadio } ) => {
if ( isRadio ) {
return (
{ description }
{ children && (