connector-wordpress/source/front/blocks/events-list/index.js

32 lines
594 B
JavaScript
Raw Normal View History

2021-11-01 20:55:37 +01:00
import edit from './edit'
import save from './save'
const { registerBlockType } = wp.blocks
const { __ } = wp.i18n
const NAME = '<wordpress-name>'
registerBlockType(NAME + '/events-list', {
title: __('Events List', '<wordpress-name>'),
2021-12-14 17:54:47 +01:00
description: __(
'A list of the upcoming events of the connected Mobilizon instance.',
'<wordpress-name>'
),
2021-11-01 20:55:37 +01:00
icon: 'list-view',
category: 'widgets',
attributes: {
eventsCount: {
type: 'number',
2021-12-14 17:54:47 +01:00
default: 3,
2021-11-01 20:55:37 +01:00
},
groupName: {
2021-12-14 17:54:47 +01:00
type: 'string',
},
2021-11-01 20:55:37 +01:00
},
supports: {
2021-12-14 17:54:47 +01:00
html: false,
2021-11-01 20:55:37 +01:00
},
edit,
save,
})