sag_components 1.0.470 → 1.0.472

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.
@@ -11,7 +11,10 @@ const SagInput = props => {
11
11
  const {
12
12
  labelText,
13
13
  inputType,
14
- onTyping
14
+ isReauired,
15
+ onTyping,
16
+ width,
17
+ borderRadius
15
18
  } = props;
16
19
  const [inputValue, setInputValue] = (0, _react.useState)('');
17
20
  const handleInputChange = e => {
@@ -21,13 +24,22 @@ const SagInput = props => {
21
24
  return /*#__PURE__*/_react.default.createElement(_SagInput.TextFieldContainer, null, /*#__PURE__*/_react.default.createElement(_SagInput.TextFieldInput, {
22
25
  type: inputType,
23
26
  value: inputValue,
24
- onChange: handleInputChange
25
- // placeholder={labelText}
26
- }), /*#__PURE__*/_react.default.createElement(_SagInput.Label, null, labelText));
27
+ onChange: handleInputChange,
28
+ placeholder: labelText,
29
+ width: width,
30
+ borderRadius: borderRadius
31
+ }), /*#__PURE__*/_react.default.createElement(_SagInput.Label, null, labelText, isReauired && /*#__PURE__*/_react.default.createElement("span", {
32
+ style: {
33
+ color: '#D23630'
34
+ }
35
+ }, " *")));
27
36
  };
28
37
  var _default = exports.default = SagInput;
29
38
  SagInput.defaultProps = {
30
39
  labelText: '',
31
40
  inputType: 'text',
41
+ isReauired: true,
42
+ width: '100%',
43
+ borderRadius: '12px',
32
44
  onTyping: () => {}
33
45
  };
@@ -9,5 +9,5 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject, _templateObject2, _templateObject3;
11
11
  const TextFieldContainer = exports.TextFieldContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
12
- const TextFieldInput = exports.TextFieldInput = _styledComponents.default.input(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: 10px;\n font-size: 16px;\n border: 1px solid #ccc;\n border-radius: 4px;\n\n &:focus + label,\n &:not(:placeholder-shown) + label {\n top: -8px;\n font-size: 12px;\n color: #007bff;\n background-color: white;\n }\n"])));
13
- const Label = exports.Label = _styledComponents.default.label(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 12px;\n left: 10px;\n transition: all 0.3s ease;\n pointer-events: none;\n font-size: 16px;\n color: #555;\n"])));
12
+ const TextFieldInput = exports.TextFieldInput = _styledComponents.default.input(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: 14px 10px;\n font-size: 14px;\n width: ", ";\n border: 1px solid #ccc;\n border-radius: ", ";\n box-sizing: border-box;\n\n /* &:focus + label,\n &:not(:placeholder-shown) + label {\n top: -8px;\n font-size: 12px;\n color: #007bff;\n background-color: white;\n } */\n"])), props => props.width, props => props.borderRadius);
13
+ const Label = exports.Label = _styledComponents.default.label(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: -8px;\n left: 10px;\n color: #1B30AA;\n pointer-events: none;\n font-size: 14px;\n padding: 0 2px;\n background: white;\n /* transition: all 0.3s ease; */\n"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.470",
3
+ "version": "1.0.472",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {