Skip to content

Commit

Permalink
docs: update the demo code of customize script (#6918)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia authored Jun 20, 2024
1 parent 41498f0 commit de66896
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions website/docs/guide/basic/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,14 @@ function Document() {
<body>
<Main />
<Scripts ScriptElement={(props) => {
return <script {...props} >
console.log('custom script');
</script>;
console.log('Script props passed from framework', props);
return (
<script
dangerouslySetInnerHTML={{
__html: `console.log('custom scripts')`,
}}
/>
);
}}
/>
</body>
Expand Down

0 comments on commit de66896

Please sign in to comment.