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
- Use descriptive/sensible `string` arguments. Depending on level of customisation.
267
+
268
+
<details>
269
+
<summary>
270
+
271
+
Example `Component.tsx.template.mjs`
272
+
273
+
</summary>
274
+
275
+
```typescript
276
+
exportdefaultwithDefaults(
277
+
({ preConfigContent, renderContent }) =>`
278
+
import { Base } from './Base';
279
+
${preConfigContent}
280
+
281
+
export const Component = () => {
282
+
${renderContent}
283
+
};
284
+
`,
285
+
{
286
+
preConfigContent: "",
287
+
renderContent: "",
288
+
},
289
+
);
290
+
```
291
+
292
+
</details>
293
+
179
294
## Recommended way to handle complex arguments in templates
180
295
181
296
Most of the time you will use string arguments for templating, but sometimes you will need to add arrays, objects, bigints, etc. You can handle them however you want, but we're recommending to use the table below as a helper.
0 commit comments