-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
32 additions
and
64 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
4 changes: 1 addition & 3 deletions
4
...ise/SvgRectanglePractice/SvgRectangle.tsx → ...pleCirclesPractice/SvgMultipleCircles.tsx
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,9 +1,7 @@ | ||
export const SvgRectangle = () => { | ||
return ( | ||
<svg width={500} height={300}> | ||
<text x="50" y="50" fill="black"> | ||
Draw a rect here! | ||
</text> | ||
{/* Add some circles here! */} | ||
</svg> | ||
); | ||
}; |
4 changes: 2 additions & 2 deletions
4
exercise/SvgTextSolution/index.js → exercise/SvgMultipleCirclesPractice/index.js
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,6 +1,6 @@ | ||
// File used to render something in codesandbox only | ||
import ReactDOM from 'react-dom'; | ||
import { SvgText } from './SvgText'; | ||
import { SvgMultipleCircles } from './SvgMultipleCircles'; | ||
|
||
const rootElement = document.getElementById('root'); | ||
ReactDOM.render(<SvgText />, rootElement); | ||
ReactDOM.render(<SvgMultipleCircles />, rootElement); |
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
exercise/SvgMultipleCirclesSolution/SvgMultipleCircles.tsx
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const SvgRectangle = () => { | ||
const numbers = [...Array(10).keys()]; | ||
|
||
return ( | ||
<svg width={500} height={300}> | ||
{numbers.map((i) => { | ||
return <circle key={i} cx={50 + i * 40} cy={150} r={20} fill="blue" />; | ||
})} | ||
</svg> | ||
); | ||
}; |
4 changes: 2 additions & 2 deletions
4
exercise/SvgLineSolution/index.js → exercise/SvgMultipleCirclesSolution/index.js
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,6 +1,6 @@ | ||
// File used to render something in codesandbox only | ||
import ReactDOM from 'react-dom'; | ||
import { SvgLine } from './SvgLine'; | ||
import { SvgMultipleCircles } from './SvgMultipleCircles'; | ||
|
||
const rootElement = document.getElementById('root'); | ||
ReactDOM.render(<SvgLine />, rootElement); | ||
ReactDOM.render(<SvgMultipleCircles />, rootElement); |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.