@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
8 lines (7 loc) • 1.1 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/components/post-template/panel.js"],
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { usePostTemplatePanelMode } from './hooks';\nimport ClassicThemeControl from './classic-theme';\nimport BlockThemeControl from './block-theme';\n\n/**\n * Displays the template controls based on the current editor settings and user permissions.\n *\n * @return {React.ReactNode} The rendered PostTemplatePanel component.\n */\nexport default function PostTemplatePanel() {\n\tconst mode = usePostTemplatePanelMode();\n\tif ( mode === 'classic' ) {\n\t\treturn <ClassicThemeControl />;\n\t}\n\tif ( mode === 'block-theme' ) {\n\t\treturn <BlockThemeControl />;\n\t}\n\treturn null;\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAAyC;AACzC,2BAAgC;AAChC,yBAA8B;AAUrB;AAHM,SAAR,oBAAqC;AAC3C,QAAM,WAAO,uCAAyB;AACtC,MAAK,SAAS,WAAY;AACzB,WAAO,4CAAC,qBAAAA,SAAA,EAAoB;AAAA,EAC7B;AACA,MAAK,SAAS,eAAgB;AAC7B,WAAO,4CAAC,mBAAAC,SAAA,EAAkB;AAAA,EAC3B;AACA,SAAO;AACR;",
"names": ["ClassicThemeControl", "BlockThemeControl"]
}