Server IP : 104.21.14.103 / Your IP : 3.135.201.52 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/base/components/radio-control/ |
Upload File : |
/** * External dependencies */ import classnames from 'classnames'; /** * Internal dependencies */ import OptionLayout from './option-layout'; const Option = ( { checked, name, onChange, option } ) => { const { value, label, description, secondaryLabel, secondaryDescription, } = option; const onChangeValue = ( event ) => onChange( event.target.value ); return ( <label className="wc-block-components-radio-control__option" htmlFor={ `${ name }-${ value }` } > <input id={ `${ name }-${ value }` } className="wc-block-components-radio-control__input" type="radio" name={ name } value={ value } onChange={ onChangeValue } checked={ checked } aria-describedby={ classnames( { [ `${ name }-${ value }__label` ]: label, [ `${ name }-${ value }__secondary-label` ]: secondaryLabel, [ `${ name }-${ value }__description` ]: description, [ `${ name }-${ value }__secondary-description` ]: secondaryDescription, } ) } /> <OptionLayout id={ `${ name }-${ value }` } label={ label } secondaryLabel={ secondaryLabel } description={ description } secondaryDescription={ secondaryDescription } /> </label> ); }; export default Option;