summaryrefslogtreecommitdiff
path: root/react/04-components/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'react/04-components/src/components')
-rw-r--r--react/04-components/src/components/MyOtherComponent.jsx14
-rw-r--r--react/04-components/src/components/Navbar.jsx9
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