/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/term-description/edit.js
26 строк
659 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { __ } from '@wordpress/i18n'; import { useBlockProps } from '@wordpress/block-editor'; import { useTermDescription } from './use-term-description'; export default function TermDescriptionEdit( { context: { termId, taxonomy }, } ) { const { termDescription } = useTermDescription( termId, taxonomy ); const blockProps = useBlockProps(); return ( <> <div { ...blockProps }> { termDescription ? ( <div dangerouslySetInnerHTML={ { __html: termDescription } } /> ) : ( <div className="wp-block-term-description__placeholder"> <span>{ __( 'Term Description' ) }</span> </div> ) } </div> </> ); }