Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1733 from tanem/housekeeping
Update examples
- Loading branch information
Showing
17 changed files
with
17,019 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { createRoot } from 'react-dom/client' | ||
import { ReactSVG } from 'react-svg' | ||
|
||
ReactDOM.render(<ReactSVG src="svg.svg" />, document.getElementById('root')) | ||
const container = document.getElementById('root') | ||
const root = createRoot(container) | ||
root.render(<ReactSVG src="svg.svg" />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import './style.css' | ||
|
||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { createRoot } from 'react-dom/client' | ||
import { ReactSVG } from 'react-svg' | ||
|
||
ReactDOM.render( | ||
<ReactSVG className="wrapper" src="svg.svg" />, | ||
document.getElementById('root') | ||
) | ||
const container = document.getElementById('root') | ||
const root = createRoot(container) | ||
root.render(<ReactSVG className="wrapper" src="svg.svg" />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { Fragment } from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
import ClipLoader from 'react-spinners/ClipLoader' | ||
import { ReactSVG } from 'react-svg' | ||
|
||
ReactDOM.render( | ||
<React.Fragment> | ||
const container = document.getElementById('root') | ||
const root = createRoot(container) | ||
root.render( | ||
<Fragment> | ||
<ReactSVG loading={() => <ClipLoader />} src="svg.svg" /> | ||
<ReactSVG | ||
fallback={() => <img alt="doge" src="doge.png" />} | ||
loading={() => <ClipLoader />} | ||
src="notfound.svg" | ||
/> | ||
</React.Fragment>, | ||
document.getElementById('root') | ||
</Fragment> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { createRoot } from 'react-dom/client' | ||
import { ReactSVG } from 'react-svg' | ||
|
||
ReactDOM.render(<ReactSVG src="svg" />, document.getElementById('root')) | ||
const container = document.getElementById('root') | ||
const root = createRoot(container) | ||
root.render(<ReactSVG src="svg" />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { createRoot } from 'react-dom/client' | ||
import { ReactSVG } from 'react-svg' | ||
|
||
ReactDOM.render( | ||
<ReactSVG src="svg.svg" wrapper="svg" />, | ||
document.getElementById('svg-root') | ||
) | ||
ReactDOM.render( | ||
<ReactSVG src="svg.svg" wrapper="svg" />, | ||
document.getElementById('html-root') | ||
) | ||
const svgContainer = document.getElementById('svg-root') | ||
const svgRoot = createRoot(svgContainer) | ||
svgRoot.render(<ReactSVG src="svg.svg" wrapper="svg" />) | ||
|
||
const htmlContainer = document.getElementById('html-root') | ||
const htmlRoot = createRoot(htmlContainer) | ||
htmlRoot.render(<ReactSVG src="svg.svg" wrapper="svg" />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom' | ||
import { createRoot } from 'react-dom/client' | ||
import { ReactSVG } from 'react-svg' | ||
|
||
ReactDOM.render(<ReactSVG src="svg.svg" />, document.getElementById('root')) | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const container = document.getElementById('root')! | ||
const root = createRoot(container) | ||
root.render(<ReactSVG src="svg.svg" />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.