Skip to content

Commit 6546eda

Browse files
authored
Merge pull request #2 from reactjs/main
Fix SandpackWithHTMLOutput to use src dir (reactjs#6613)
2 parents dae648a + c118938 commit 6546eda

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/components/MDX/SandpackWithHTMLOutput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function ShowRenderedHTML({children}) {
2020
{formatHTML(markup)}
2121
</pre>
2222
</>
23-
);
23+
);
2424
}`;
2525

2626
const formatHTML = `
@@ -77,8 +77,8 @@ export default memo(function SandpackWithHTMLOutput(
7777
) {
7878
const children = [
7979
...Children.toArray(props.children),
80-
createFile('ShowRenderedHTML.js', ShowRenderedHTML),
81-
createFile('formatHTML.js hidden', formatHTML),
80+
createFile('src/ShowRenderedHTML.js', ShowRenderedHTML),
81+
createFile('src/formatHTML.js hidden', formatHTML),
8282
createFile('package.json hidden', packageJSON),
8383
];
8484
return <Sandpack {...props}>{children}</Sandpack>;

src/content/reference/react-dom/components/link.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ In addition, if the `<link>` is to a stylesheet (namely, it has `rel="stylesheet
9696

9797
There are two exception to this special behavior:
9898

99-
* If the link doesn't have a `precedence` prop, there is no special behavior, because the order of stylesheets within the document is significant, so React needs to know how to order this stylesheet relative to others, which you specify using the `precedence` prop.
99+
* If the link doesn't have a `precedence` prop, there is no special behavior, because the order of stylesheets within the document is significant, so React needs to know how to order this stylesheet relative to others, which you specify using the `precedence` prop.
100100
* If you supply any of the `onLoad`, `onError`, or `disabled` props, there is no special behavior, because these props indicate that you are managing the loading of the stylesheet manually within your component.
101101

102102
This special treatment comes with two caveats:
@@ -114,7 +114,7 @@ You can annotate the document with links to related resources such as an icon, c
114114

115115
<SandpackWithHTMLOutput>
116116

117-
```js App.js active
117+
```js src/App.js active
118118
import ShowRenderedHTML from './ShowRenderedHTML.js';
119119

120120
export default function BlogPage() {
@@ -141,7 +141,7 @@ When you want to use a stylesheet, it can be beneficial to call the [preinit](/r
141141

142142
<SandpackWithHTMLOutput>
143143

144-
```js App.js active
144+
```js src/App.js active
145145
import ShowRenderedHTML from './ShowRenderedHTML.js';
146146

147147
export default function SiteMapPage() {
@@ -164,7 +164,7 @@ Stylesheets can conflict with each other, and when they do, the browser goes wit
164164

165165
<SandpackWithHTMLOutput>
166166

167-
```js App.js active
167+
```js src/App.js active
168168
import ShowRenderedHTML from './ShowRenderedHTML.js';
169169

170170
export default function HomePage() {
@@ -195,7 +195,7 @@ If you render the same stylesheet from multiple components, React will place onl
195195

196196
<SandpackWithHTMLOutput>
197197

198-
```js App.js active
198+
```js src/App.js active
199199
import ShowRenderedHTML from './ShowRenderedHTML.js';
200200

201201
export default function HomePage() {

src/content/reference/react-dom/components/meta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ You can render the `<meta>` component from any component. React will put a `<met
7272

7373
<SandpackWithHTMLOutput>
7474

75-
```js App.js active
75+
```js src/App.js active
7676
import ShowRenderedHTML from './ShowRenderedHTML.js';
7777

7878
export default function SiteMapPage() {

src/content/reference/react-dom/components/script.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If you supply an `src` and `async` prop, your component will suspend while the s
9191

9292
<SandpackWithHTMLOutput>
9393

94-
```js App.js active
94+
```js src/App.js active
9595
import ShowRenderedHTML from './ShowRenderedHTML.js';
9696

9797
function Map({lat, long}) {
@@ -124,7 +124,7 @@ To include an inline script, render the `<script>` component with the script sou
124124

125125
<SandpackWithHTMLOutput>
126126

127-
```js App.js active
127+
```js src/App.js active
128128
import ShowRenderedHTML from './ShowRenderedHTML.js';
129129

130130
function Tracking() {

src/content/reference/react-dom/components/style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ If you supply an `href` and `precedence` prop, your component will suspend while
7373

7474
<SandpackWithHTMLOutput>
7575

76-
```js App.js active
76+
```js src/App.js active
7777
import ShowRenderedHTML from './ShowRenderedHTML.js';
7878
import { useId } from 'react';
7979

src/content/reference/react-dom/components/title.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Render the `<title>` component from any component with text as its children. Rea
6666

6767
<SandpackWithHTMLOutput>
6868

69-
```js App.js active
69+
```js src/App.js active
7070
import ShowRenderedHTML from './ShowRenderedHTML.js';
7171

7272
export default function ContactUsPage() {

0 commit comments

Comments
 (0)