summaryrefslogtreecommitdiff
path: root/react/04-components/src/components/MyOtherComponent.jsx
diff options
context:
space:
mode:
authorKamal Wickramanayake <kamal@inbox.lk>2026-06-27 22:14:56 +0530
committerKamal Wickramanayake <kamal@inbox.lk>2026-06-27 22:14:56 +0530
commit5ed431db2c4a45b35fe1ab9e6d8a69ca62bbbeb5 (patch)
tree3720d8b9e2eaa215383e69e21e2b8f27d31d23d0 /react/04-components/src/components/MyOtherComponent.jsx
parent29b898049d5322a5833b95d55f1d1a9e7dd94eaf (diff)
Added react/04-components sample project
Diffstat (limited to 'react/04-components/src/components/MyOtherComponent.jsx')
-rw-r--r--react/04-components/src/components/MyOtherComponent.jsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/react/04-components/src/components/MyOtherComponent.jsx b/react/04-components/src/components/MyOtherComponent.jsx
new file mode 100644
index 0000000..1dc5c68
--- /dev/null
+++ b/react/04-components/src/components/MyOtherComponent.jsx
@@ -0,0 +1,14 @@
+import React from 'react'
+
+const MyOtherComponent = ({title, children}) => {
+ return (
+ <>
+ <div style={{marginTop: '10px'}}>
+ <div style={{fontWeight: 'bold', backgroundColor: '#f0f0f0', border: '1px solid #ccc'}}>{title}</div>
+ <div>{children}</div>
+ </div>
+ </>
+ )
+}
+
+export default MyOtherComponent \ No newline at end of file