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