import { RadioControl } from '@wordpress/components';

const RadioField = ( { field, value, onChange } ) => (
	<RadioControl
		label={ field.label }
		selected={ value ?? field.default ?? '' }
		options={ field.options ?? [] }
		onChange={ onChange }
		help={ field.help }
	/>
);

export default RadioField;
