@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 CHANGED
@@ -203,17 +203,8 @@ var RadioElement = (props) => {
203
203
  props.onChange(selectedOptions);
204
204
  }
205
205
  };
206
- const renderOptions = () => {
207
- return props.options && props.options.map((option) => /* @__PURE__ */ import_react6.default.createElement(
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
- renderOptions()
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 renderOptions = () => {
160
- return props.options && props.options.map((option) => /* @__PURE__ */ React6.createElement(
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
- renderOptions()
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.12-Beta26",
3
+ "version": "0.0.12-Beta28",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",