@bigbinary/neeto-thank-you-frontend 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/README.md +31 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -108,8 +108,7 @@ application.
108
108
  - `thankYouTextAlignment` - Set alignment of the "Thank You" text in "Thank You"
109
109
  page
110
110
  - `customHeader` - Accepts a React Node & replaces the default Header.
111
- - `appName` - Accepts appName, which will be used for branding
112
- `Made with {{appName}}` [default: "neetoForm"].
111
+ - `appName` - Accepts `appName`, which will be used for generating the sign up URL in the branding text.
113
112
  - `disableSubmitAnotherResponse` - Removes the toggle for submitting another
114
113
  response, incase of neetoForm [default: false].
115
114
  - `disableRadioSelection` - Removes the radio selector for
@@ -120,6 +119,9 @@ application.
120
119
  configuration is updated. The function's first argument corresponds to the
121
120
  parameters passed to the `onSuccess` callback of React Query mutations, while
122
121
  the second argument represents the previous configuration object.
122
+ - `brandingInfo` - Accepts an object that specifies the branding details. It can have 2 keys:
123
+ 1. `displayText` - Specifies the translation key for the branding text to be displayed. The app name should be wrapped with `<signUpLink>` to set the redirection to neeto-auth properly.
124
+ 2. `additionalComponents` - Accepts an optional object that specifies the additional components for styling the display text. This will be passed to the `components` prop of `Trans` component.
123
125
 
124
126
  ##### Configuration
125
127
 
@@ -150,6 +152,16 @@ const App = () => {
150
152
  // Add your logic here
151
153
  };
152
154
 
155
+ const THANK_YOU_PAGE_BRANDING_INFO = {
156
+ // "Build your own form using <signUpLink><span>neetoForm.</span></signUpLink> It’s free. <Link>Learn more</Link>."
157
+ displayText: "form.settings.thankyou.brandingText",
158
+ additionalComponents: {
159
+ Link: (
160
+ <a href={WEBSITE_URL} rel="noreferrer" target="_blank" />
161
+ ),
162
+ },
163
+ };
164
+
153
165
  return (
154
166
  <>
155
167
  <ConfigureThankYou
@@ -167,6 +179,7 @@ const App = () => {
167
179
  thankYouTextAlignment={thankYouTextAlignment}
168
180
  appName="neetoForm"
169
181
  onConfigUpdateSuccess={handleConfigUpdateSuccess}
182
+ brandingInfo={THANK_YOU_PAGE_BRANDING_INFO}
170
183
  />
171
184
  </>
172
185
  );
@@ -189,6 +202,10 @@ configurations set in the host application.
189
202
  - `isThankYouPageLoading` - Boolean value to show the loading state
190
203
  - `customPageLoader` - Specify a custom loader component to replace the default
191
204
  page loader.
205
+ - `appName` - Accepts `appName`, which will be used for generating the sign up URL in the branding text.
206
+ - `brandingInfo` - Accepts an object that specifies the branding details. It can have 2 keys:
207
+ 1. `displayText` - Specifies the translation key for the branding text to be displayed. The app name should be wrapped with `<signUpLink>` to set the redirection to neeto-auth properly.
208
+ 2. `additionalComponents` - Accepts an optional object that specifies the additional components for styling the display text. This will be passed to the `components` prop of `Trans` component.
192
209
 
193
210
  ##### Usage
194
211
 
@@ -205,14 +222,26 @@ const App = () => {
205
222
  },
206
223
  ];
207
224
 
225
+ const THANK_YOU_PAGE_BRANDING_INFO = {
226
+ // "Build your own form using <signUpLink><span>neetoForm.</span></signUpLink> It’s free. <Link>Learn more</Link>."
227
+ displayText: "form.settings.thankyou.brandingText",
228
+ additionalComponents: {
229
+ Link: (
230
+ <a href={WEBSITE_URL} rel="noreferrer" target="_blank" />
231
+ ),
232
+ },
233
+ };
234
+
208
235
  return (
209
236
  <>
210
237
  <ShowThankYou
238
+ appName="neetoForm"
211
239
  entityId={entityId}
212
240
  isDraftPreview={isDraftPreview}
213
241
  resubmitLink={resubmitLink}
214
242
  socialHandles={socialHandles}
215
243
  isThankYouPageLoading={isThankYouPageLoading}
244
+ brandingInfo={THANK_YOU_PAGE_BRANDING_INFO}
216
245
  />
217
246
  </>
218
247
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-thank-you-frontend",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A repo acts as the source of truth for the new nano's structure, configs, data etc.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/bigbinary/neeto-thank-you-nano",