| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
|
| 3 |
import getIcon from '../../utils/get-icon'; |
| 4 |
import metadata from './block.json'; |
| 5 |
import edit from './edit'; |
| 6 |
import save from './save'; |
| 7 |
|
| 8 |
const { name } = metadata; |
| 9 |
|
| 10 |
export { metadata, name }; |
| 11 |
|
| 12 |
export const settings = { |
| 13 |
icon: getIcon('block-changelog', true), |
| 14 |
ghostkit: { |
| 15 |
previewUrl: 'https://www.ghostkit.io/docs/blocks/changelog/', |
| 16 |
}, |
| 17 |
example: { |
| 18 |
attributes: { |
| 19 |
version: '1.0.0', |
| 20 |
date: new Date().toLocaleDateString(), |
| 21 |
}, |
| 22 |
innerBlocks: [ |
| 23 |
{ |
| 24 |
name: 'core/list', |
| 25 |
attributes: { |
| 26 |
className: 'is-style-none', |
| 27 |
}, |
| 28 |
innerBlocks: [ |
| 29 |
{ |
| 30 |
name: 'core/list-item', |
| 31 |
attributes: { |
| 32 |
content: `<span class="ghostkit-badge" style="background: #4ab866">${__('Added', 'ghostkit')}</span>${__('Something', 'ghostkit')}`, |
| 33 |
}, |
| 34 |
}, |
| 35 |
{ |
| 36 |
name: 'core/list-item', |
| 37 |
attributes: { |
| 38 |
content: `<span class="ghostkit-badge" style="background: #0366d6">${__('Fixed', 'ghostkit')}</span>${__('Something', 'ghostkit')}`, |
| 39 |
}, |
| 40 |
}, |
| 41 |
{ |
| 42 |
name: 'core/list-item', |
| 43 |
attributes: { |
| 44 |
content: `<span class="ghostkit-badge" style="background: #4ab866">${__('Improved', 'ghostkit')}</span>${__('Something', 'ghostkit')}`, |
| 45 |
}, |
| 46 |
}, |
| 47 |
], |
| 48 |
}, |
| 49 |
], |
| 50 |
}, |
| 51 |
edit, |
| 52 |
save, |
| 53 |
}; |
| 54 |
|