Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/reactjs/reactjs.org into sy…
Browse files Browse the repository at this point in the history
…nc-c1189382
  • Loading branch information
docschina-bot committed Feb 6, 2024
2 parents 7c81906 + c118938 commit e34ec18
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/components/MDX/SandpackWithHTMLOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ShowRenderedHTML({children}) {
{formatHTML(markup)}
</pre>
</>
);
);
}`;

const formatHTML = `
Expand Down Expand Up @@ -77,8 +77,8 @@ export default memo(function SandpackWithHTMLOutput(
) {
const children = [
...Children.toArray(props.children),
createFile('ShowRenderedHTML.js', ShowRenderedHTML),
createFile('formatHTML.js hidden', formatHTML),
createFile('src/ShowRenderedHTML.js', ShowRenderedHTML),
createFile('src/formatHTML.js hidden', formatHTML),
createFile('package.json hidden', packageJSON),
];
return <Sandpack {...props}>{children}</Sandpack>;
Expand Down
10 changes: 5 additions & 5 deletions src/content/reference/react-dom/components/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ In addition, if the `<link>` is to a stylesheet (namely, it has `rel="stylesheet

There are two exception to this special behavior:

* 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.
* 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.
* 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.

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

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

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

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

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

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

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

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

export default function HomePage() {
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/components/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ React 对 `<meta>` 的扩展当前仅在 React Canary 与 experimental 渠道中

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

export default function SiteMapPage() {
Expand Down
4 changes: 2 additions & 2 deletions src/content/reference/react-dom/components/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ If you supply an `src` and `async` prop, your component will suspend while the s

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

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

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

function Tracking() {
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/components/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If you supply an `href` and `precedence` prop, your component will suspend while

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';
import { useId } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/components/title.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Render the `<title>` component from any component with text as its children. Rea

<SandpackWithHTMLOutput>

```js App.js active
```js src/App.js active
import ShowRenderedHTML from './ShowRenderedHTML.js';

export default function ContactUsPage() {
Expand Down

0 comments on commit e34ec18

Please sign in to comment.