@devtron-labs/devtron-fe-common-lib 0.0.10 → 0.0.11

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.
@@ -109,6 +109,7 @@ export interface ReloadType {
109
109
  export interface RadioGroupItemProps {
110
110
  value: string;
111
111
  dataTestId?: string;
112
+ disabled?: boolean;
112
113
  }
113
114
  export interface RadioGroupProps {
114
115
  value: string;
package/dist/index.js CHANGED
@@ -10192,7 +10192,7 @@ var RadioGroupItem = /** @class */ (function (_super) {
10192
10192
  RadioGroupItem.prototype.render = function () {
10193
10193
  var _this = this;
10194
10194
  return (jsxRuntime.jsx(RadioGroupContext.Consumer, { children: function (context) {
10195
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: context.disabled ? 'form__radio-item disabled' : 'form__radio-item' }, { children: [jsxRuntime.jsx("input", { type: "radio", className: "form__checkbox", name: context.name, disabled: context.disabled, onChange: context.onChange, value: _this.props.value, checked: context.value === _this.props.value, "data-testid": _this.props.dataTestId }), jsxRuntime.jsxs("span", __assign({ className: "form__radio-item-content", "data-testid": "".concat(_this.props.dataTestId, "-span") }, { children: [jsxRuntime.jsx("span", { className: "radio__button" }), jsxRuntime.jsx("span", __assign({ className: "radio__title" }, { children: _this.props.children }))] }))] })) }));
10195
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: (_this.props.disabled || context.disabled) ? 'form__radio-item disabled' : 'form__radio-item' }, { children: [jsxRuntime.jsx("input", { type: "radio", className: "form__checkbox", name: context.name, disabled: context.disabled || _this.props.disabled, onChange: context.onChange, value: _this.props.value, checked: context.value === _this.props.value, "data-testid": _this.props.dataTestId }), jsxRuntime.jsxs("span", __assign({ className: "form__radio-item-content", "data-testid": "".concat(_this.props.dataTestId, "-span") }, { children: [jsxRuntime.jsx("span", { className: "radio__button" }), jsxRuntime.jsx("span", __assign({ className: "radio__title" }, { children: _this.props.children }))] }))] })) }));
10196
10196
  } }));
10197
10197
  };
10198
10198
  return RadioGroupItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -9,12 +9,12 @@ export class RadioGroupItem extends Component<RadioGroupItemProps> {
9
9
  {(context) => {
10
10
  return (
11
11
  <>
12
- <label className={context.disabled ? 'form__radio-item disabled' : 'form__radio-item'}>
12
+ <label className={(this.props.disabled || context.disabled) ? 'form__radio-item disabled' : 'form__radio-item'}>
13
13
  <input
14
14
  type="radio"
15
15
  className="form__checkbox"
16
16
  name={context.name}
17
- disabled={context.disabled}
17
+ disabled={context.disabled || this.props.disabled}
18
18
  onChange={context.onChange}
19
19
  value={this.props.value}
20
20
  checked={context.value === this.props.value}
@@ -119,6 +119,7 @@ export interface ReloadType {
119
119
  export interface RadioGroupItemProps {
120
120
  value: string
121
121
  dataTestId?: string
122
+ disabled?: boolean
122
123
  }
123
124
 
124
125
  export interface RadioGroupProps {