- WordPress 6.9.4 (es_ES) with Kadence theme - Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto - Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold - Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI) - Plugins: Kadence Blocks, Polylang, Contact Form 7 - Custom CSS with full brand styling and responsive layout - HTTPS enforced via wp-config.php proxy detection
44 lines
1017 B
JavaScript
44 lines
1017 B
JavaScript
import PropTypes from 'prop-types';
|
|
|
|
import { __ } from '@wordpress/i18n';
|
|
const { Component } = wp.element;
|
|
const { TextareaControl } = wp.components;
|
|
|
|
class TextareaComponent extends Component {
|
|
constructor(props) {
|
|
super( props );
|
|
let value = props.control.setting.get();
|
|
this.state = {
|
|
value
|
|
};
|
|
this.defaultValue = props.control.params.default || '';
|
|
this.updateValues = this.updateValues.bind( this );
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div className="kadence-control-field kadence-text-control">
|
|
<TextareaControl
|
|
label={ this.props.control.params.label ? this.props.control.params.label : undefined }
|
|
value={ this.state.value }
|
|
onChange={ (value) => {
|
|
this.updateValues( value );
|
|
} }
|
|
/>
|
|
{ this.props.control.renderNotice() }
|
|
</div>
|
|
);
|
|
}
|
|
|
|
updateValues(value) {
|
|
this.setState( { value: value } );
|
|
this.props.control.setting.set( value );
|
|
}
|
|
}
|
|
|
|
TextareaComponent.propTypes = {
|
|
control: PropTypes.object.isRequired
|
|
};
|
|
|
|
export default TextareaComponent;
|