You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -48,96 +48,99 @@ import {UnderlineNav} from '@primer/react/drafts'
48
48
49
49
### Overflow Behaviour
50
50
51
-
When overflow occurs, the component first hides icons if present to optimize for space and show as many items as possible. (Only for fine pointer devices)
Component first hides icons if they present to optimize for space and show as many items as possible. If there is still an overflow, it will display the items that don't fit in the `More` menu.
description="A unique name for the rendered 'nav' landmark. It will also be used to label the arrow buttons that control the scroll behaviour on coarse pointer devices. (I.e. 'Scroll ${aria-label} left/right')"
134
+
description="A unique name for the rendered 'nav' landmark. It will also be used to label the arrow
135
+
buttons that control the scroll behaviour on coarse pointer devices. (I.e.
136
+
'Scroll ${aria-label} left/right')
137
+
"
135
138
/>
136
139
<PropsTableRow
137
140
name="loadingCounters"
138
141
type="boolean"
139
142
defaultValue="false"
140
-
description="Whether all of the counters are in loading state"
143
+
description="Whether the navigation items are in loading state. Component waits for all the counters to finish loading to prevent multiple layout shifts."
141
144
/>
142
145
<PropsTableRow
143
146
name="afterSelect"
@@ -150,18 +153,23 @@ If there is still overflow, the component will behave depending on the pointer.
150
153
### UnderlineNav.Item
151
154
152
155
<PropsTable>
156
+
<PropsTableRow
157
+
name="href"
158
+
type="string"
159
+
description="The URL that the item navigates to. 'href' is passed to the underlying '<a>' element. If 'as' is specified, the component may need different props and 'href' is ignored. (Required prop for the react router is 'to' for example)"
160
+
/>
153
161
<PropsTableRowname="icon"type="Component"description="The leading icon comes before item label" />
154
162
<PropsTableRowname="selected"type="boolean"description="Whether the link is selected" />
155
163
<PropsTableRow
156
164
name="onSelect"
157
165
type="(event) => void"
158
-
description="The handler that gets called when a nav link is selected"
166
+
description="The handler that gets called when a nav link is selected. For example, a manual route binding can be done here(I.e. 'navigate(href)' for the react router.)"
159
167
/>
160
168
<PropsTableRow
161
169
name="as"
162
-
type="string | Component"
170
+
type="string | React.ElementType"
163
171
defaultValue="a"
164
-
description="What kind of component needs to be rendered"
172
+
description="The underlying element to render — either a HTML element name or a React component."
0 commit comments