Add route block

This commit is contained in:
Justin Foell
2021-01-29 16:06:21 -06:00
parent c7c07fec47
commit c91c65cc8b
7 changed files with 413 additions and 98 deletions
+29
View File
@@ -0,0 +1,29 @@
/* global wp, wpStrava */
import { registerBlockType } from '@wordpress/blocks';
import edit from './edit';
registerBlockType( 'wp-strava/route', {
title: 'Strava Route',
icon: 'chart-line',
category: 'embed',
attributes: {
url: {
type: 'string',
default: '',
},
imageOnly: {
type: 'boolean',
default: false,
},
displayMarkers: {
type: 'boolean',
default: false,
},
som: {
type: 'string',
default: null,
},
},
edit,
save: () => null,
} );