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