1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

add Gutenberg events list block

This commit is contained in:
Daniel Waxweiler
2022-06-03 23:48:19 +02:00
parent c042851184
commit 3360a9e7a7
20 changed files with 1558 additions and 797 deletions

View File

@ -1,31 +1,7 @@
import edit from './edit'
import save from './save'
import edit from './edit.js'
const { registerBlockType } = wp.blocks
const { __ } = wp.i18n
const NAME = '<wordpress-name>'
registerBlockType(NAME + '/events-list', {
title: __('Events List', '<wordpress-name>'),
description: __(
'A list of the upcoming events of the connected Mobilizon instance.',
'<wordpress-name>'
),
icon: 'list-view',
category: 'widgets',
attributes: {
eventsCount: {
type: 'number',
default: 3,
},
groupName: {
type: 'string',
},
},
supports: {
html: false,
},
edit,
save,
})
registerBlockType(NAME + '/events-list', { edit })