deprecated
2 months ago
block.json
1 month ago
edit.js
2 months ago
icon.svg
2 months ago
index.js
2 months ago
index.php
2 months ago
save.js
2 months ago
style.scss
3 days ago
transforms.js
2 months ago
index.js
73 lines
| 1 | /** |
| 2 | * Faq block type |
| 3 | * |
| 4 | */ |
| 5 | /** |
| 6 | * Alert block type |
| 7 | * |
| 8 | */ |
| 9 | import { title, content } from '@vkblocks/utils/example-data'; |
| 10 | import { ReactComponent as Icon } from './icon.svg'; |
| 11 | import deprecated from './deprecated/'; |
| 12 | import edit from './edit'; |
| 13 | import metadata from './block.json'; |
| 14 | import save from './save'; |
| 15 | import transforms from './transforms'; |
| 16 | import { __ } from '@wordpress/i18n'; |
| 17 | |
| 18 | const { name } = metadata; |
| 19 | |
| 20 | export { metadata, name }; |
| 21 | |
| 22 | export const settings = { |
| 23 | icon: <Icon />, |
| 24 | styles: [ |
| 25 | { |
| 26 | name: 'vk_faq-normal', |
| 27 | label: __('Normal', 'vk-blocks'), |
| 28 | isDefault: true, |
| 29 | }, |
| 30 | { |
| 31 | name: 'vk_faq-bgfill-circle', |
| 32 | label: __('Bgfill Circle', 'vk-blocks'), |
| 33 | }, |
| 34 | { |
| 35 | name: 'vk_faq-bgfill-square', |
| 36 | label: __('Bgfill Square', 'vk-blocks'), |
| 37 | }, |
| 38 | { |
| 39 | name: 'vk_faq-bgfill-rounded', |
| 40 | label: __('Bgfill Rounded', 'vk-blocks'), |
| 41 | }, |
| 42 | { |
| 43 | name: 'vk_faq-border-circle', |
| 44 | label: __('Border Circle', 'vk-blocks'), |
| 45 | }, |
| 46 | { |
| 47 | name: 'vk_faq-border-square', |
| 48 | label: __('Border Square', 'vk-blocks'), |
| 49 | }, |
| 50 | { |
| 51 | name: 'vk_faq-border-rounded', |
| 52 | label: __('Border Rounded', 'vk-blocks'), |
| 53 | }, |
| 54 | ], |
| 55 | example: { |
| 56 | attributes: { |
| 57 | heading: title, |
| 58 | }, |
| 59 | innerBlocks: [ |
| 60 | { |
| 61 | name: 'core/paragraph', |
| 62 | attributes: { |
| 63 | content, |
| 64 | }, |
| 65 | }, |
| 66 | ], |
| 67 | }, |
| 68 | save, |
| 69 | edit, |
| 70 | deprecated, |
| 71 | transforms, |
| 72 | }; |
| 73 |