index.js
35 lines
| 1 | import Progressbar from './edit'; |
| 2 | import metadata from '@blocks/progress-bar/block.json'; |
| 3 | |
| 4 | const { __ } = wp.i18n; |
| 5 | |
| 6 | const { name, icon = '' } = metadata; |
| 7 | |
| 8 | /** |
| 9 | * Available items for `useEditProps`: |
| 10 | * - uniqKey |
| 11 | * - formFields |
| 12 | * - blockName |
| 13 | * - attrHelp |
| 14 | */ |
| 15 | const settings = { |
| 16 | icon: <span dangerouslySetInnerHTML={ { __html: icon } }></span>, |
| 17 | description: __( |
| 18 | `Use the Progress Bar block to add the navigation and show users |
| 19 | on what page they are now and how many pages are left to finish the form.`, |
| 20 | 'jet-form-builder', |
| 21 | ), |
| 22 | edit: Progressbar, |
| 23 | useEditProps: [ 'uniqKey', 'attrHelp', 'blockName' ], |
| 24 | example: { |
| 25 | attributes: { |
| 26 | isPreview: true, |
| 27 | }, |
| 28 | }, |
| 29 | }; |
| 30 | |
| 31 | export { |
| 32 | metadata, |
| 33 | name, |
| 34 | settings, |
| 35 | }; |