@websolutespa/payload-plugin-bowl
Version:
Bowl PayloadCms plugin of the BOM Repository
17 lines (16 loc) • 528 B
JavaScript
import { deepMerge } from '@websolutespa/payload-utils';
import { translateCollection } from '../translations';
export const BlockDefaults = {};
/**
*
* @param {Block} config
* @returns {Block} Return a `Block` with inherited fields: `id`, `createdAt`, `updatedAt`.
*/ export const withBlock = (options)=>{
const blockConfig = deepMerge({
...BlockDefaults
}, options);
delete blockConfig['type'];
translateCollection(blockConfig);
return blockConfig;
};
//# sourceMappingURL=withBlock.js.map