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
The `<TemplatePreview>` block renders a preview of the Boilerplate templates inline, displaying the rendered output directly in your runbook. It uses the Gruntwork Boilerplate template engine to generate content, and optionally saves files to your generated files workspace.
7
+
The `<TemplateInline>` block renders a preview of the Boilerplate templates inline, displaying the rendered output directly in your runbook. It uses the Gruntwork Boilerplate template engine to generate content, and optionally saves files to your generated files workspace.
After the user fills out the form and clicks Submit, `<TemplatePreview>` will render the Terraform template with the provided values and display the result inline.
41
+
After the user fills out the form and clicks Submit, `<TemplateInline>` will render the Terraform template with the provided values and display the result inline.
42
42
43
43
TODO: Screenshots
44
44
45
45
## When to use
46
46
47
-
Use `<TemplatePreview>` when you want to show users what generated content looks like, or when you want to show generated content without actually creating files in the generated files workspace.
47
+
Use `<TemplateInline>` when you want to show users what generated content looks like, or when you want to show generated content without actually creating files in the generated files workspace.
48
48
49
49
Here are some common use cases:
50
50
@@ -58,16 +58,16 @@ Here are some common use cases:
58
58
**required**
59
59
**type:**`ReactNode`
60
60
61
-
The template content to render. Write the template as a fenced code block inside the `<TemplatePreview>` tags. The code block should include a language hint (e.g., `hcl`, `yaml`, `dockerfile`) for syntax highlighting.
61
+
The template content to render. Write the template as a fenced code block inside the `<TemplateInline>` tags. The code block should include a language hint (e.g., `hcl`, `yaml`, `dockerfile`) for syntax highlighting.
62
62
63
63
#### Example
64
64
65
65
`````mdx
66
-
<TemplatePreviewinputsId="some-config">
66
+
<TemplateInlineinputsId="some-config">
67
67
```txt
68
68
Hello, {{ .Name }}. This is inline template content!
| Template location | Inline only | Can reference directories |
249
249
| Use case | Show what will be generated, optionally save | Generate files from external templates |
250
250
251
251
<Asidetype="note">
252
-
Use `<TemplatePreview>` when you want to show users what files will look like inline. Add `generateFile={true}` to also save the file to the workspace.
252
+
Use `<TemplateInline>` when you want to show users what files will look like inline. Add `generateFile={true}` to also save the file to the workspace.
253
253
</Aside>
254
254
255
255
## Complete example
256
256
257
-
Here's a complete example showing `<Inputs>` with multiple `<TemplatePreview>` blocks:
257
+
Here's a complete example showing `<Inputs>` with multiple `<TemplateInline>` blocks:
/** ID or array of IDs of Inputs components to get variable values from. When multiple IDs are provided, variables are merged in order (later IDs override earlier ones). */
0 commit comments