@transferwise/components 0.0.0-experimental-48ee369 → 0.0.0-experimental-892d236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -10061,9 +10061,7 @@ function RadioGroup({
10061
10061
  selectedValue: controlledValue,
10062
10062
  onChange
10063
10063
  }) {
10064
- const [controlled] = React.useState(false /* TODO: `controlledValue !== undefined` (BREAKING) */);
10065
10064
  const [uncontrolledValue, setUncontrolledValue] = React.useState(controlledValue);
10066
- const selectedValue = controlled ? controlledValue : uncontrolledValue;
10067
10065
  return radios.length > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
10068
10066
  role: "radiogroup",
10069
10067
  children: radios.map(({
@@ -10075,11 +10073,9 @@ function RadioGroup({
10075
10073
  ...restProps,
10076
10074
  name: name,
10077
10075
  value: value,
10078
- checked: value === selectedValue,
10076
+ checked: value === uncontrolledValue,
10079
10077
  onChange: nextValue => {
10080
- if (!controlled) {
10081
- setUncontrolledValue(nextValue);
10082
- }
10078
+ setUncontrolledValue(nextValue);
10083
10079
  onChange(nextValue);
10084
10080
  }
10085
10081
  }, index))