You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,32 @@ As you develop your custom component, please keep the following guidelines in mi
59
59
***Modular Structure**: You can structure your component across many files in multiple directories or just in a single file. This flexibility allows you to organize your component in a way that best suits your development style.
60
60
***Styling**: Only .css files are supported for styling. Ensure that your component's visual design is implemented using CSS.
61
61
***External Packages**: External packages can be added to your `package.json` file and will be loaded as part of the component at build time once in Limio. Please just remember to keep the `"react": "*"` dependency so that your component and Limio use the same version of React.
62
+
***Custom Subcomponents**: From Release 102, it is now possible to create custom subcomponents. A subcomponent is one that is intended to be used as part of the Limio Form component. This enables new workflows and means even more customisation is possible when developing a checkout flow. Whether it's inserting custom fields to collect user information or displaying information, it is now possible to deliver that easily with just one small change. In order to add a custom subcomponent, in your package.json file, simply add the isCustomSubcomponent: true flag.
62
63
64
+
```json
65
+
{
66
+
"name": "headings",
67
+
"version": "1.0.0",
68
+
"description": "A custom subcomponent",
69
+
"main": "./index.js",
70
+
"isCustomSubcomponent": true,
71
+
"author": "",
72
+
"dependencies": {
73
+
...
74
+
},
75
+
"limioProps": [
76
+
...
77
+
]
78
+
}
79
+
```
80
+
81
+
Once your changes have been pushed and the component has been built, you should then bable to see your new custom subcomponent when managing a Form component on a page.
***Modular Structure**: You can structure your component across many files in multiple directories or just in a single file. This flexibility allows you to organize your component in a way that best suits your development style.
79
79
***Styling**: Only .css files are supported for styling. Ensure that your component's visual design is implemented using CSS.
80
80
***External Packages**: External packages can be added to your `package.json` file and will be loaded as part of the component at build time once in Limio. Please just remember to keep the `"react": "*"` dependency so that your component and Limio use the same version of React.
81
+
***Custom Subcomponents**: From Release 102, it is now possible to create custom subcomponents. A subcomponent is one that is intended to be used as part of the Limio Form component. This enables new workflows and means even more customisation is possible when developing a checkout flow. Whether it's inserting custom fields to collect user information or displaying information, it is now possible to deliver that easily with just one small change. In order to add a custom subcomponent, in your package.json file, simply add the isCustomSubcomponent: true flag.
81
82
82
-
##### Step 2: Viewing Your Component in Storybook
83
+
```json
84
+
{
85
+
"name": "headings",
86
+
"version": "1.0.0",
87
+
"description": "A custom subcomponent",
88
+
"main": "./index.js",
89
+
"isCustomSubcomponent": true,
90
+
"author": "",
91
+
"dependencies": {
92
+
...
93
+
},
94
+
"limioProps": [
95
+
...
96
+
]
97
+
}
98
+
```
99
+
100
+
Once your changes have been pushed and the component has been built, you should then be able to see your new custom subcomponent when managing a Form component on a page.
101
+
102
+
<divclassName="sb-image-container">
103
+
<imgsrc={"https://developers.limio.com/~gitbook/image?url=https%3A%2F%2F2254146468-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-L_ITRAhJRCD176zw_Pu%252Fuploads%252Fj51gv4SNIwlI3kR0npKp%252Fcustom-subcomponent.png%3Falt%3Dmedia%26token%3Df95d7f83-0290-4407-afcf-dcb7a3cf3532&width=768&dpr=1&quality=100&sign=c01f299b380b6236e45710b28948934b2c6d5d5be8a6b417e94a1e3f3ee8defe"}alt="Custom subcomponents in Limio pagebuilder" />
104
+
</div>
105
+
106
+
#### Step 2: Viewing Your Component in Storybook
83
107
After creating your component, you can immediately see it in action within the Limio Component Playground. To do so:
0 commit comments