/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/pullquote/index.js
56 строк
1 KB
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { __ } from '@wordpress/i18n'; import { pullquote as icon } from '@wordpress/icons'; import { privateApis as blocksPrivateApis } from '@wordpress/blocks'; import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; import save from './save'; import transforms from './transforms'; import { unlock } from '../lock-unlock'; const { fieldsKey, formKey } = unlock( blocksPrivateApis ); const { name } = metadata; export { metadata, name }; export const settings = { icon, example: { attributes: { value: // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg. __( 'One of the hardest things to do in technology is disrupt yourself.' ), citation: __( 'Matt Mullenweg' ), }, }, transforms, edit, save, deprecated, }; if ( window.__experimentalContentOnlyInspectorFields ) { settings[ fieldsKey ] = [ { id: 'value', label: __( 'Content' ), type: 'text', Edit: 'rich-text', // TODO: replace with custom component }, { id: 'citation', label: __( 'Citation' ), type: 'text', Edit: 'rich-text', // TODO: replace with custom component }, ]; settings[ formKey ] = { fields: [ 'value', 'citation' ], }; } export const init = () => initBlock( { name, metadata, settings } );