Commit 42c0f72
authored
NavigationTabs: Add tag prop to allow overriding the underlying nav element (#2868)
## Summary:
When NavigationTabs is placed in another `nav` element, NavigationTabs doesn't need to use a `nav` element. By adding the `tag` prop, consumers can customize the underlying element. `tag` defaults to `nav` when not provided
Issue: WB-2156
## Test plan:
Confirm setting the tag prop changes the underlying element rendered (`?path=/story/packages-tabs-navigationtabs--tag`)
<img width="1471" height="350" alt="image" src="https://github.com/user-attachments/assets/a5134d6c-0412-47cc-8d08-51eae6c4cd7a" />
Author: beaesguerra
Reviewers: marcysutton
Required Reviewers:
Approved By: marcysutton
Checks: ✅ 12 checks were successful, ⏭️ 3 checks have been skipped
Pull Request URL: #28681 parent 5036747 commit 42c0f72
File tree
5 files changed
+58
-3
lines changed- .changeset
- __docs__/wonder-blocks-tabs
- packages/wonder-blocks-tabs/src/components
- __tests__
5 files changed
+58
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | | - | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
117 | 124 | | |
118 | 125 | | |
119 | 126 | | |
120 | | - | |
| 127 | + | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
| |||
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
139 | | - | |
| 146 | + | |
140 | 147 | | |
141 | 148 | | |
142 | 149 | | |
| |||
0 commit comments