diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-06-27 22:14:56 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-06-27 22:14:56 +0530 |
| commit | 5ed431db2c4a45b35fe1ab9e6d8a69ca62bbbeb5 (patch) | |
| tree | 3720d8b9e2eaa215383e69e21e2b8f27d31d23d0 /react/04-components/src/components | |
| parent | 29b898049d5322a5833b95d55f1d1a9e7dd94eaf (diff) | |
Added react/04-components sample project
Diffstat (limited to 'react/04-components/src/components')
| -rw-r--r-- | react/04-components/src/components/MyOtherComponent.jsx | 14 | ||||
| -rw-r--r-- | react/04-components/src/components/Navbar.jsx | 9 |
2 files changed, 23 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 diff --git a/react/04-components/src/components/Navbar.jsx b/react/04-components/src/components/Navbar.jsx new file mode 100644 index 0000000..afa1f4d --- /dev/null +++ b/react/04-components/src/components/Navbar.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +const Navbar = () => { + return ( + <div>Navbar</div> + ) +} + +export default Navbar
\ No newline at end of file |
