@ansible/ansible-ui-framework 0.0.498 → 0.0.500

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,8 @@
2
2
  export declare function PageFormSwitch(props: {
3
3
  id?: string;
4
4
  label: string;
5
+ labelOn?: string;
6
+ labelOff?: string;
5
7
  name: string;
6
8
  helperText?: string;
7
9
  required?: boolean;
@@ -21,7 +21,7 @@ function PageFormSwitch(props) {
21
21
  var _b = (0, react_hook_form_1.useController)({ name: props.name }), field = _b.field, fieldState = _b.fieldState;
22
22
  var error = fieldState.error;
23
23
  var id = (_a = props.id) !== null && _a !== void 0 ? _a : props.name;
24
- return ((0, jsx_runtime_1.jsx)(react_core_1.FormGroup, __assign({ id: "".concat(id, "-form-group"), fieldId: id, label: props.label, helperText: props.helperText, isRequired: props.required, validated: (error === null || error === void 0 ? void 0 : error.message) ? 'error' : undefined, helperTextInvalid: error === null || error === void 0 ? void 0 : error.message }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Switch, { id: id, "aria-describedby": "".concat(id, "-form-group"),
24
+ return ((0, jsx_runtime_1.jsx)(react_core_1.FormGroup, __assign({ id: "".concat(id, "-form-group"), fieldId: id, label: props.label, helperText: props.helperText, isRequired: props.required, validated: (error === null || error === void 0 ? void 0 : error.message) ? 'error' : undefined, helperTextInvalid: error === null || error === void 0 ? void 0 : error.message }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Switch, { id: id, label: props.labelOn, labelOff: props.labelOff, "aria-describedby": "".concat(id, "-form-group"),
25
25
  // isRequired={props.required}
26
26
  // validated={error?.message ? 'error' : undefined}
27
27
  autoFocus: props.autoFocus,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "0.0.498",
4
+ "version": "0.0.500",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",