[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/js/bp-messages/js/blocks/sitewide-notices/ -> edit.js (source)

   1  /**
   2   * WordPress dependencies.
   3   */
   4   const {
   5      blockEditor: {
   6          InspectorControls,
   7      },
   8      components: {
   9          Disabled,
  10          PanelBody,
  11          TextControl,
  12      },
  13      element: {
  14          Fragment,
  15          createElement,
  16      },
  17      i18n: {
  18          __,
  19      },
  20      serverSideRender: ServerSideRender,
  21  } = wp;
  22  
  23  const editSitewideNoticesBlock = ( { attributes, setAttributes } ) => {
  24      const { title } = attributes;
  25  
  26      return (
  27          <Fragment>
  28              <InspectorControls>
  29                  <PanelBody title={ __( 'Settings', 'buddypress' ) } initialOpen={ true }>
  30                      <TextControl
  31                          label={ __( 'Title', 'buddypress' ) }
  32                          value={ title }
  33                          onChange={ ( text ) => {
  34                              setAttributes( { title: text } );
  35                          } }
  36                      />
  37                  </PanelBody>
  38              </InspectorControls>
  39              <Disabled>
  40                  <ServerSideRender block="bp/sitewide-notices" attributes={ attributes } />
  41              </Disabled>
  42          </Fragment>
  43      );
  44  };
  45  
  46  export default editSitewideNoticesBlock;


Generated: Fri May 5 01:01:24 2023 Cross-referenced by PHPXref 0.7.1