UNPKG

@wordpress/editor

Version:
8 lines (7 loc) 999 B
{ "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": ";AAGA,SAAS,gCAAgC;AACzC,OAAO,yBAAyB;AAChC,OAAO,uBAAuB;AAUrB;AAHM,SAAR,oBAAqC;AAC3C,QAAM,OAAO,yBAAyB;AACtC,MAAK,SAAS,WAAY;AACzB,WAAO,oBAAC,uBAAoB;AAAA,EAC7B;AACA,MAAK,SAAS,eAAgB;AAC7B,WAAO,oBAAC,qBAAkB;AAAA,EAC3B;AACA,SAAO;AACR;", "names": [] }