From cea4ee938a12079d2bf3e1a35facc36bc58d3264 Mon Sep 17 00:00:00 2001 From: Ajit Bohra Date: Wed, 16 May 2018 12:36:49 +0530 Subject: [PATCH] Fix/prevent classname override (#6764) * Add translators note * Prevent class override & add classname to BaseControl * Components: Remove obsolete spaces in parenthesis --- components/checkbox-control/index.js | 4 ++-- components/form-token-field/index.js | 3 ++- components/radio-control/index.js | 5 +++-- components/range-control/index.js | 2 +- components/select-control/index.js | 3 ++- components/textarea-control/index.js | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/checkbox-control/index.js b/components/checkbox-control/index.js index c231143f4f88cf..4344db2cacf84f 100644 --- a/components/checkbox-control/index.js +++ b/components/checkbox-control/index.js @@ -5,12 +5,12 @@ import BaseControl from '../base-control'; import withInstanceId from '../higher-order/with-instance-id'; import './style.scss'; -function CheckboxControl( { label, heading, checked, help, instanceId, onChange, ...props } ) { +function CheckboxControl( { label, className, heading, checked, help, instanceId, onChange, ...props } ) { const id = `inspector-checkbox-control-${ instanceId }`; const onChangeValue = ( event ) => onChange( event.target.checked ); return ( - + onChange( event.target.value ); return ! isEmpty( options ) && ( - + { options.map( ( option, index ) =>
+