From 834f627ce56064397b0cbe80cd2c0e5c0a246649 Mon Sep 17 00:00:00 2001 From: Oksana Shtelma Date: Thu, 28 May 2026 18:15:01 +0300 Subject: [PATCH 1/2] add task solution --- src/App.jsx | 13 ++++++------- src/components/Sum/Sum.jsx | 6 +++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index dc51f769d..708add0a8 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,14 +1,13 @@ import React from 'react'; import './App.scss'; +import { Sum } from './components/Sum/Sum'; export const App = () => ( <> -

Sum of 2 and 3 is 5

-

Sum of -5 and 5 is 0

-

Sum of 10 and 0 is 10

-

Sum of 0 and 5 is 5

-

Sum of 0 and 0 is 0

- {/* Replace paragraphs with Sum componets */} - {/* And remove commented lines :) */} + + + + + ); diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 381aa0422..66c8a3e67 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1 +1,5 @@ -// export const Sum = () => (); +export const Sum = ({ a = 0, b = 0 }) => ( +

+ `Sum of {a} and {b} is {a + b}` +

+); From 7efd8ba5b848d4845c97cb639227f975dae52482 Mon Sep 17 00:00:00 2001 From: Oksana Shtelma Date: Thu, 28 May 2026 21:15:41 +0300 Subject: [PATCH 2/2] add task solution2 --- src/components/Sum/Sum.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 66c8a3e67..f06972209 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1,5 +1,5 @@ export const Sum = ({ a = 0, b = 0 }) => (

- `Sum of {a} and {b} is {a + b}` + Sum of {a} and {b} is {a + b}

);