UNPKG

@wordpress/global-styles-ui

Version:
1 lines • 1.68 kB
{"version":3,"file":"screen-background.cjs","names":["unlock","blockEditorPrivateApis","useSetting","ScreenHeader","__","WCText","BackgroundPanel"],"sources":["../src/screen-background.tsx"],"sourcesContent":["import { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __experimentalText as WCText } from '@wordpress/components';\nimport BackgroundPanel from './background-panel';\nimport { ScreenHeader } from './screen-header';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { useHasBackgroundPanel } = unlock( blockEditorPrivateApis );\n\nfunction ScreenBackground() {\n\tconst [ settings ] = useSetting( '' );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Background' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<WCText>\n\t\t\t\t\t\t{ __( \"Set styles for the site's background.\" ) }\n\t\t\t\t\t</WCText>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenBackground;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,EAAE,2BAAA,GAA0BA,iBAAAA,OAAAA,CAAQC,wBAAAA,WAAuB;AAEjE,SAAS,mBAAmB;CAC3B,MAAM,CAAE,aAAA,GAAaC,WAAAA,WAAAA,CAAY,EAAG;CACpC,MAAM,qBAAqB,sBAAuB,QAAS;CAC3D,OACC,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,cAAD;EACC,QAAA,GAAQC,gBAAAA,GAAAA,CAAI,YAAa;EACzB,aACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,oBAAD,EAAA,WAAA,GACGD,gBAAAA,GAAAA,CAAI,uCAAwC,EACvC,CAAA;CAET,CAAA,GACC,sBAAsB,iBAAA,GAAA,kBAAA,IAAA,CAACE,uBAAAA,SAAD,CAAkB,CAAA,CACzC,EAAA,CAAA;AAEJ"}