Skip to content

Instantly share code, notes, and snippets.

@LuigiClaudio
Last active June 18, 2020 23:29
Show Gist options
  • Save LuigiClaudio/90c2b5a6003e6f7cbe13358474b8815a to your computer and use it in GitHub Desktop.
Save LuigiClaudio/90c2b5a6003e6f7cbe13358474b8815a to your computer and use it in GitHub Desktop.
const storeProductsCollection = [
{
label: 'Store',
name: 'storeProducts',
editor: { preview: false },
format: 'json',
files: [
{
label: 'Products',
name: 'productsList',
file: 'storeProducts/storeProducts.json',
fields: [
{
label: 'Product',
name: 'product',
widget: 'list',
allow_add: true,
collapsed: false,
fields: [
{
label: 'Title',
name: 'title',
widget: 'string',
},
{
label: 'Active',
name: 'isActive',
widget: 'boolean',
required: true,
},
{
label: 'Product ID',
name: 'productId',
widget: 'string',
},
{
label: 'Subtitle',
name: 'subtitle',
widget: 'string',
required: false,
},
{
label: 'Category List',
name: 'categoryList',
widget: 'list',
required: false,
collapsed: false,
fields: [
{
label: 'Category',
name: 'category',
widget: 'string',
required: false,
},
],
},
{
label: 'Group',
name: 'group',
widget: 'select',
options: ['women', 'men', 'kids'],
required: false,
},
{
label: 'Short Description',
name: 'shortDescription',
widget: 'text',
required: false,
},
{
label: 'Description',
name: 'description',
widget: 'text',
required: false,
},
{
label: 'Discount',
name: 'discount',
widget: 'number',
valueType: 'float',
default: 0,
},
],
},
],
},
],
},
];
export default storeProductsCollection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment