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 `Render` component allows us to include a "partial", a reusable Markdown snippet, onto a page.
10
10
@@ -15,40 +15,43 @@ It also accepts parameters that can be used as variables within the partial, so
15
15
```mdx live
16
16
import { Render } from"~/components";
17
17
18
-
<Renderfile="simple-props"params={{
19
-
name: "world",
20
-
}} />
18
+
<Render
19
+
file="simple-props"
20
+
params={{
21
+
name: "world",
22
+
}}
23
+
/>
21
24
```
22
25
23
26
### Inputs
24
27
25
28
-`file` <Typetext="string" />
26
29
27
-
This should be the name of the partial, without the containing directory or file extension. For example, `/partials/style-guide/hello.mdx` would be `file="hello"`.
30
+
This should be the name of the partial, without the containing directory or file extension. For example, `/partials/style-guide/hello.mdx` would be `file="hello"`.
If you wish to substitute values inside your partial, you can use pass params which can be referenced in your partial. Refer to [properties](#properties).
54
+
If you wish to substitute values inside your partial, you can use pass params which can be referenced in your partial. Refer to [properties](#properties).
52
55
53
56
## Properties
54
57
@@ -128,9 +131,12 @@ import linkRaw from "~/content/partials/style-guide/link-in-props.mdx?raw";
128
131
```mdx live
129
132
import { Render } from"~/components";
130
133
131
-
<Renderfile="link-in-props"params={{
132
-
link: "/style-guide/components/render/#links"
133
-
}} />
134
+
<Render
135
+
file="link-in-props"
136
+
params={{
137
+
link: "/style-guide/components/render/#links",
138
+
}}
139
+
/>
134
140
```
135
141
136
142
#### Images
@@ -185,4 +191,8 @@ import { Render } from "~/components";
0 commit comments