sprint-asia-custom-component 0.1.74 → 0.1.76

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
@@ -44150,7 +44150,8 @@
44150
44150
  title = "",
44151
44151
  value,
44152
44152
  onChange,
44153
- isRequired = true
44153
+ isRequired = true,
44154
+ className
44154
44155
  }) => {
44155
44156
  // ADDED function to handle the change from parent
44156
44157
 
@@ -44158,7 +44159,7 @@
44158
44159
  onChange(content);
44159
44160
  };
44160
44161
  return /*#__PURE__*/React__default["default"].createElement("div", {
44161
- className: "w-full h-60"
44162
+ className: "w-full"
44162
44163
  }, title && /*#__PURE__*/React__default["default"].createElement("div", {
44163
44164
  className: "flex"
44164
44165
  }, /*#__PURE__*/React__default["default"].createElement("p", {
@@ -44168,20 +44169,21 @@
44168
44169
  }, "*")), /*#__PURE__*/React__default["default"].createElement(ReactQuill$1, {
44169
44170
  value: value,
44170
44171
  onChange: handleChange,
44172
+ className: className,
44171
44173
  modules: {
44172
44174
  toolbar: [[{
44173
- 'header': [1, 3, 4, 5, 6, false]
44174
- }], ['bold', 'italic', 'link', {
44175
- 'list': 'bullet'
44175
+ header: [1, 3, 4, 5, 6, false]
44176
+ }], ["bold", "italic", "link", {
44177
+ list: "bullet"
44176
44178
  }, {
44177
- 'list': 'ordered'
44179
+ list: "ordered"
44178
44180
  }], [{
44179
- 'indent': '-1'
44181
+ indent: "-1"
44180
44182
  }, {
44181
- 'indent': '+1'
44183
+ indent: "+1"
44182
44184
  }]]
44183
44185
  },
44184
- formats: ['header', 'bold', 'italic', 'strike', 'blockquote', 'list', 'bullet', 'link', 'indent']
44186
+ formats: ["header", "bold", "italic", "strike", "blockquote", "list", "bullet", "link", "indent"]
44185
44187
  }));
44186
44188
  };
44187
44189
 
@@ -48077,6 +48079,7 @@
48077
48079
  exports.Stepper = Stepper;
48078
48080
  exports.Switch = Switch;
48079
48081
  exports.TabBar = TabBar;
48082
+ exports.TextEditor = TextEditor;
48080
48083
  exports.TextInput = TextInput;
48081
48084
  exports.VerticalStepBar = VerticalStepBar;
48082
48085
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.74",
4
+ "version": "0.1.76",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -1,56 +1,42 @@
1
- import React from 'react';
2
- import ReactQuill from 'react-quill';
3
- import '../../assets/css/reactquill/quill.snow.css';
4
-
1
+ import React from "react";
2
+ import ReactQuill from "react-quill";
3
+ import "../../assets/css/reactquill/quill.snow.css";
5
4
 
6
5
  // ADDED value and onChange
7
6
 
8
- const TextEditor = ({
9
- title = "",
10
- value,
11
- onChange,
12
- isRequired = true,
13
- }) => {
14
-
15
-
16
- // ADDED function to handle the change from parent
17
-
18
- const handleChange = (content) => {
19
- onChange(content);
20
- };
21
-
22
- return (
23
- <div className='w-full h-60'>
24
- {title &&
25
- <div className='flex'>
26
- <p className="text-sm font-normal text-black mb-1">{title}</p>
27
- {isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
28
- </div>
29
- }
30
-
7
+ const TextEditor = ({ title = "", value, onChange, isRequired = true, className }) => {
8
+ // ADDED function to handle the change from parent
31
9
 
32
- {/* ADDED the parameters to be used in Parent*/}
10
+ const handleChange = (content) => {
11
+ onChange(content);
12
+ };
33
13
 
34
- <ReactQuill
35
- value={value}
36
- onChange={handleChange}
37
- modules={{
38
- toolbar: [
39
- [{ 'header': [1, 3, 4, 5, 6, false] }],
40
- ['bold', 'italic', 'link', { 'list': 'bullet' }, { 'list': 'ordered' }],
41
- [{ 'indent': '-1' }, { 'indent': '+1' }],
42
- ],
43
- }}
44
- formats={[
45
- 'header',
46
- 'bold', 'italic', 'strike', 'blockquote',
47
- 'list', 'bullet',
48
- 'link',
49
- 'indent',
50
- ]}
51
- />
14
+ return (
15
+ <div className="w-full">
16
+ {title && (
17
+ <div className="flex">
18
+ <p className="text-sm font-normal text-black mb-1">{title}</p>
19
+ {isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
52
20
  </div>
53
- );
21
+ )}
22
+
23
+ {/* ADDED the parameters to be used in Parent*/}
24
+
25
+ <ReactQuill
26
+ value={value}
27
+ onChange={handleChange}
28
+ className={className}
29
+ modules={{
30
+ toolbar: [
31
+ [{ header: [1, 3, 4, 5, 6, false] }],
32
+ ["bold", "italic", "link", { list: "bullet" }, { list: "ordered" }],
33
+ [{ indent: "-1" }, { indent: "+1" }],
34
+ ],
35
+ }}
36
+ formats={["header", "bold", "italic", "strike", "blockquote", "list", "bullet", "link", "indent"]}
37
+ />
38
+ </div>
39
+ );
54
40
  };
55
41
 
56
42
  export default TextEditor;
package/src/index.js CHANGED
@@ -86,6 +86,7 @@ import SearchDropdown from "./components/searchdropdown";
86
86
  import FilterDropdown from "./components/filter/filterDropdown";
87
87
  import Footer from "./components/footer";
88
88
  import Header from "./components/header";
89
+ import TextEditor from "./components/texteditor";
89
90
 
90
91
  export {
91
92
  Header,
@@ -144,4 +145,5 @@ export {
144
145
  DepositList,
145
146
  ModalDeposit,
146
147
  DescriptionFile,
148
+ TextEditor,
147
149
  };