Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* The attributes for this block.
*/
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes.
*/
setAttributes: PropTypes.func.isRequired,
// from withSpokenMessages
debouncedSpeak: PropTypes.func.isRequired,
};
export default withSpokenMessages( ReviewsByProductEditor );
* The attributes for this block.
*/
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes.
*/
setAttributes: PropTypes.func.isRequired,
// from withSpokenMessages
debouncedSpeak: PropTypes.func.isRequired,
};
export default withSpokenMessages( ReviewsByCategoryEditor );
* The attributes for this block
*/
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes
*/
setAttributes: PropTypes.func.isRequired,
// from withSpokenMessages
debouncedSpeak: PropTypes.func.isRequired,
};
export default withSpokenMessages( ProductsBlock );
* The attributes for this block
*/
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes
*/
setAttributes: PropTypes.func.isRequired,
// from withSpokenMessages
debouncedSpeak: PropTypes.func.isRequired,
};
export default withSpokenMessages( ProductsByAttributeBlock );
(() => {
interface Props {
speak: any;
debouncedSpeak: any;
foo: string;
}
const MyComponentWithSpokenMessages = C.withSpokenMessages(({ speak, debouncedSpeak, foo }: Props) => (
<div>
<button> speak('Spoken message')}>Speak</button>
<button> debouncedSpeak('Delayed message')}>Debounced Speak</button>
</div>
));
;
})();
* Internal dependencies
*/
import ModalLinkUI from './modal';
const name = 'core/link';
export const link = {
name,
title: __( 'Link' ),
tagName: 'a',
className: null,
attributes: {
url: 'href',
target: 'target',
},
edit: withSpokenMessages( class LinkEdit extends Component {
constructor() {
super( ...arguments );
this.addLink = this.addLink.bind( this );
this.stopAddingLink = this.stopAddingLink.bind( this );
this.onRemoveFormat = this.onRemoveFormat.bind( this );
this.state = {
addingLink: false,
};
}
addLink() {
const { value, onChange } = this.props;
const text = getTextContent( slice( value ) );
if ( text && isURL( text ) ) {
closeGeneralSidebar();
} else {
openGeneralSidebar( 'edit-post/block' );
speakMessage();
onClick();
}
} }
icon="admin-generic"
shortcut={ shortcut }
>
{ ! small && label }
);
}
export default withSpokenMessages( BlockInspectorButton );
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes
*/
setAttributes: PropTypes.func.isRequired,
/**
* From withSpokenMessages
*/
debouncedSpeak: PropTypes.func.isRequired,
};
export default withSpokenMessages( ProductsByTagBlock );
headingLevel={ headingLevel }
heading={ heading }
onChange={ ( value ) =>
setAttributes( { heading: value } )
}
/>
) }
);
};
export default withSpokenMessages( Edit );
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes
*/
setAttributes: PropTypes.func.isRequired,
/**
* From withSpokenMessages
*/
debouncedSpeak: PropTypes.func.isRequired,
};
export default withSpokenMessages( ProductsByTagBlock );