@apexcura/ui-components 0.0.12-Beta26 → 0.0.12-Beta28
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.js +11 -12
- package/dist/index.mjs +11 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -203,17 +203,8 @@ var RadioElement = (props) => {
|
|
|
203
203
|
props.onChange(selectedOptions);
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
|
-
const
|
|
207
|
-
return
|
|
208
|
-
import_antd6.Radio.Button,
|
|
209
|
-
{
|
|
210
|
-
key: option.value,
|
|
211
|
-
value: option.value,
|
|
212
|
-
className: selectedValue === option.value ? option.selectedClassName : option.className,
|
|
213
|
-
disabled: isDisabled
|
|
214
|
-
},
|
|
215
|
-
option.label
|
|
216
|
-
));
|
|
206
|
+
const getButtonStyle = (option) => {
|
|
207
|
+
return selectedValue === option.value ? option.selectedClassName : option.className;
|
|
217
208
|
};
|
|
218
209
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
219
210
|
import_antd6.Radio.Group,
|
|
@@ -223,7 +214,15 @@ var RadioElement = (props) => {
|
|
|
223
214
|
optionType,
|
|
224
215
|
className: props.className ? props.className : ""
|
|
225
216
|
},
|
|
226
|
-
|
|
217
|
+
props.options && props.options.map((option) => /* @__PURE__ */ import_react6.default.createElement(
|
|
218
|
+
import_antd6.Radio,
|
|
219
|
+
{
|
|
220
|
+
key: option.value,
|
|
221
|
+
value: option.value,
|
|
222
|
+
className: `${getButtonStyle(option)} ${isDisabled ? "cursor-not-allowed" : ""}`
|
|
223
|
+
},
|
|
224
|
+
option.label
|
|
225
|
+
))
|
|
227
226
|
);
|
|
228
227
|
};
|
|
229
228
|
|
package/dist/index.mjs
CHANGED
|
@@ -156,17 +156,8 @@ var RadioElement = (props) => {
|
|
|
156
156
|
props.onChange(selectedOptions);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
const
|
|
160
|
-
return
|
|
161
|
-
Radio.Button,
|
|
162
|
-
{
|
|
163
|
-
key: option.value,
|
|
164
|
-
value: option.value,
|
|
165
|
-
className: selectedValue === option.value ? option.selectedClassName : option.className,
|
|
166
|
-
disabled: isDisabled
|
|
167
|
-
},
|
|
168
|
-
option.label
|
|
169
|
-
));
|
|
159
|
+
const getButtonStyle = (option) => {
|
|
160
|
+
return selectedValue === option.value ? option.selectedClassName : option.className;
|
|
170
161
|
};
|
|
171
162
|
return /* @__PURE__ */ React6.createElement(
|
|
172
163
|
Radio.Group,
|
|
@@ -176,7 +167,15 @@ var RadioElement = (props) => {
|
|
|
176
167
|
optionType,
|
|
177
168
|
className: props.className ? props.className : ""
|
|
178
169
|
},
|
|
179
|
-
|
|
170
|
+
props.options && props.options.map((option) => /* @__PURE__ */ React6.createElement(
|
|
171
|
+
Radio,
|
|
172
|
+
{
|
|
173
|
+
key: option.value,
|
|
174
|
+
value: option.value,
|
|
175
|
+
className: `${getButtonStyle(option)} ${isDisabled ? "cursor-not-allowed" : ""}`
|
|
176
|
+
},
|
|
177
|
+
option.label
|
|
178
|
+
))
|
|
180
179
|
);
|
|
181
180
|
};
|
|
182
181
|
|