trepur_components 0.2.21 → 0.2.22

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.
@@ -24,7 +24,9 @@ const Form = _ref => {
24
24
  id,
25
25
  classes,
26
26
  title,
27
+ titleClasses,
27
28
  onSubmit,
29
+ ref,
28
30
  components,
29
31
  buttonDesign,
30
32
  buttonBgColor,
@@ -36,25 +38,27 @@ const Form = _ref => {
36
38
  buttonType,
37
39
  onClick
38
40
  } = _ref;
39
- return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
41
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h1", {
42
+ className: titleClasses
43
+ }, title), /*#__PURE__*/_react.default.createElement("form", _extends({}, id && {
40
44
  id: id
41
45
  }, {
42
- className: classes
46
+ ref: ref,
47
+ className: classes,
48
+ onSubmit: onSubmit
43
49
  }), components && components.map(component => {
44
- if (component.type === 'Title') {
45
- return /*#__PURE__*/_react.default.createElement("h1", {
46
- className: component.classes
47
- }, component.text);
48
- } else if (component.type === 'Input') {
50
+ if (component.type === 'Input') {
49
51
  return /*#__PURE__*/_react.default.createElement(_Input.default, {
50
52
  classes: component.classes,
51
53
  label: component.label,
52
- placeholder: component.placeholder
54
+ placeholder: component.placeholder,
55
+ type: component.type,
56
+ name: component.name
53
57
  });
54
58
  } else if (component.type === 'Button') {
55
59
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
56
60
  type: component.htmlType,
57
- onSubmit: onSubmit,
61
+ onClick: onClick,
58
62
  classes: component.classes,
59
63
  ctaText: component.ctaText,
60
64
  bgColor: buttonBgColor,
@@ -67,7 +71,7 @@ const Form = _ref => {
67
71
  buttonDesign: buttonDesign
68
72
  });
69
73
  } else return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
70
- }));
74
+ })));
71
75
  };
72
76
 
73
77
  var _default = Form;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.2.21",
5
+ "version": "0.2.22",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",