Use label tag for toggleable shipping zones (https://github.com/woocommerce/woocommerce-admin/pull/4554)
This commit is contained in:
parent
0eb906f56d
commit
960bc68dba
|
@ -263,16 +263,24 @@ class ShippingRates extends Component {
|
|||
) }
|
||||
</div>
|
||||
<div className="woocommerce-shipping-rate__main">
|
||||
<div className="woocommerce-shipping-rate__name">
|
||||
{ zone.name }
|
||||
{ zone.toggleable && (
|
||||
{ zone.toggleable ? (
|
||||
<label
|
||||
htmlFor={ `woocommerce-shipping-rate__toggle-${ zone.id }` }
|
||||
className="woocommerce-shipping-rate__name"
|
||||
>
|
||||
{ zone.name }
|
||||
<FormToggle
|
||||
id={ `woocommerce-shipping-rate__toggle-${ zone.id }` }
|
||||
{ ...getInputProps(
|
||||
`${ zone.id }_enabled`
|
||||
) }
|
||||
/>
|
||||
) }
|
||||
</div>
|
||||
</label>
|
||||
) : (
|
||||
<div className="woocommerce-shipping-rate__name">
|
||||
{ zone.name }
|
||||
</div>
|
||||
) }
|
||||
{ ( ! zone.toggleable ||
|
||||
values[
|
||||
`${ zone.id }_enabled`
|
||||
|
|
Loading…
Reference in New Issue