File "CommentsControl.js"

Full path: /home/webcknlt/admissiontell.com/wp-content/plugins/generateblocks/src/extend/dynamic-content/inspector-controls/CommentsControl.js
File size: 923 B (923 B bytes)
MIME-type: text/x-java
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

import { TextControl } from '@wordpress/components';
import { __ } from '@wordpress/i18n';

export default function CommentsControl( props ) {
	const {
		isActive,
		noCommentsText,
		singleCommentText,
		multipleCommentsText,
		setAttributes,
	} = props;

	return (
		<>
			{ isActive &&
				<>
					<TextControl
						label={ __( 'No comments text', 'generateblocks' ) }
						value={ noCommentsText }
						onChange={ ( value ) => setAttributes( { noCommentsText: value } ) }
					/>

					<TextControl
						label={ __( 'Single comment text', 'generateblocks' ) }
						value={ singleCommentText }
						onChange={ ( value ) => setAttributes( { singleCommentText: value } ) }
					/>

					<TextControl
						label={ __( 'Multiple comments text', 'generateblocks' ) }
						value={ multipleCommentsText }
						onChange={ ( value ) => setAttributes( { multipleCommentsText: value } ) }
					/>
				</>
			}
		</>
	);
}