pesona-ui 1.0.27 → 1.0.28

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/dist/index.esm.js CHANGED
@@ -8571,9 +8571,12 @@ const RadioButtonGroup = React.forwardRef(({ name, label, message, size = 'md',
8571
8571
  label,
8572
8572
  " ",
8573
8573
  required && React.createElement("span", { className: "text-danger" }, "*"))),
8574
- React.createElement("div", { className: "btn-group", "data-toggle": "buttons" }, options.map((option) => (React.createElement("label", { key: option.value, className: `btn auto btn-default btn-${size} ${option.value === selectedValue ? 'active' : ''}` },
8575
- React.createElement("input", { type: "radio", id: option.value.toString(), name: name, value: option.value, ref: ref, ...rest }),
8576
- React.createElement("span", null, option.label))))),
8574
+ React.createElement("div", { className: "btn-group", "data-toggle": "buttons" }, options.map((option) => {
8575
+ const isActive = option.value.toString() === selectedValue?.toString();
8576
+ return (React.createElement("label", { key: option.value.toString(), className: `btn auto btn-default btn-${size} ${isActive ? 'active' : ''}` },
8577
+ React.createElement("input", { type: "radio", id: option.value.toString(), name: name, value: option.value.toString(), ref: ref, ...rest }),
8578
+ React.createElement("span", null, option.label)));
8579
+ })),
8577
8580
  error ? (React.createElement("small", { className: "form-message text-danger" }, error)) : (message && React.createElement("small", { className: "form-message text-muted" }, message))));
8578
8581
  });
8579
8582
  RadioButtonGroup.displayName = 'RadioButtonGroup';