-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
1 parent
dbb5c23
commit 8a57528
Showing
2 changed files
with
11 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import React from 'react'; | ||
import './App.scss'; | ||
import { Sum } from './components/Sum/Sum'; | ||
|
||
export const App = () => ( | ||
<> | ||
<p>Sum of 2 and 3 is 5</p> | ||
<p>Sum of -5 and 5 is 0</p> | ||
<p>Sum of 10 and 0 is 10</p> | ||
<p>Sum of 0 and 5 is 5</p> | ||
<p>Sum of 0 and 0 is 0</p> | ||
{/* Replace paragraphs with Sum componets */} | ||
{/* And remove commented lines :) */} | ||
<Sum a={2} b={3} /> | ||
<Sum a={-5} b={5} /> | ||
<Sum a={10} /> | ||
<Sum b={5} /> | ||
<Sum /> | ||
</> | ||
); |
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 +1,5 @@ | ||
// export const Sum = () => (); | ||
export const Sum = ({ a = 0, b = 0 }) => ( | ||
<p> | ||
Sum of {a} and {b} is {a + b} | ||
</p> | ||
); |