@websolutespa/payload-plugin-bowl
Version:
Bowl PayloadCms plugin of the BOM Repository
19 lines (18 loc) • 500 B
JavaScript
import { deepMerge } from '@websolutespa/payload-utils';
export const CheckboxDefaults = {
name: 'checkbox',
type: 'checkbox',
defaultValue: false
};
export const withCheckbox = (options = {})=>{
const field = deepMerge(CheckboxDefaults, options);
return field;
};
export const withCheckboxRequired = (options = {})=>{
const field = deepMerge({
...CheckboxDefaults,
required: true
}, options);
return field;
};
//# sourceMappingURL=withCheckbox.js.map