Skip to content

Commit 8085c11

Browse files
committed
Props Are Not Forwarded to Inner Elements
1 parent 5e693b3 commit 8085c11

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/components/Examples.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { useState } from 'react';
2+
3+
import Section from './Section';
24
import TabButton from './TabButton';
35

46
import { EXAMPLES } from '../data/examples';
@@ -25,8 +27,7 @@ export default function Examples() {
2527
}
2628

2729
return (
28-
<section id="examples">
29-
<h2>Examples</h2>
30+
<Section id="examples" title="Examples">
3031
<menu>
3132
<TabButton
3233
isSelected={selectedTopic === 'components'}
@@ -54,6 +55,6 @@ export default function Examples() {
5455
</TabButton>
5556
</menu>
5657
{tabContent}
57-
</section>
58+
</Section>
5859
);
5960
}

src/components/Section.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function Section({ children, title }) {
2+
return (
3+
<section>
4+
<h2>{title}</h2>
5+
{children}
6+
</section>
7+
);
8+
}

0 commit comments

Comments
 (0)