Server IP : 172.67.158.161 / Your IP : 18.116.63.105 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/home/giankuin/sieuthiweb.com.vn/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/components/block-title/ |
Upload File : |
/** * External dependencies */ import PropTypes from 'prop-types'; import { PlainText } from '@wordpress/block-editor'; import classnames from 'classnames'; /** * Internal dependencies */ import './editor.scss'; const BlockTitle = ( { className, headingLevel, onChange, heading } ) => { const TagName = `h${ headingLevel }`; return ( <TagName> <PlainText className={ classnames( 'wc-block-editor-components-title', className ) } value={ heading } onChange={ onChange } /> </TagName> ); }; BlockTitle.propTypes = { /** * Classname to add to title in addition to the defaults. */ className: PropTypes.string, /** * The value of the heading. */ value: PropTypes.string, /** * Callback to update the attribute when text is changed. */ onChange: PropTypes.func, /** * Level of the heading tag (1, 2, 3... will render <h1>, <h2>, <h3>... elements). */ headingLevel: PropTypes.number, }; export default BlockTitle;