Skip to content

Commit 3f66a2e

Browse files
committed
Update tab sidebar graphics
1 parent 35a6db3 commit 3f66a2e

File tree

5 files changed

+61
-3
lines changed

5 files changed

+61
-3
lines changed

src/css/custom.css

+8
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@
185185
transform: scale(0.8);
186186
}
187187

188+
article img {
189+
max-width: 100%;
190+
vertical-align: top;
191+
margin: var(--ifm-leading) 0;
192+
border-radius: var(--ifm-pre-border-radius);
193+
box-shadow: var(--ifm-global-shadow-lw);
194+
}
195+
188196
article video {
189197
width: 300px;
190198
height: auto;
98.7 KB
Loading
-178 KB
Binary file not shown.
78 KB
Loading

versioned_docs/version-7.x/bottom-tab-navigator.md

+53-3
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,22 @@ Position of the tab bar. Available values are:
398398

399399
When the tab bar is positioned on the `left` or `right`, it is styled as a sidebar. This can be useful when you want to show a sidebar on larger screens and a bottom tab bar on smaller screens:
400400

401+
<Tabs groupId="config" queryString="config">
402+
<TabItem value="static" label="Static" default>
403+
404+
```js
405+
const Tabs = createBottomTabNavigator({
406+
screenOptions: {
407+
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
408+
},
409+
410+
// ...
411+
});
412+
```
413+
414+
</TabItem>
415+
<TabItem value="dynamic" label="Dynamic">
416+
401417
```js
402418
<Tab.Navigator
403419
screenOptions={{
@@ -406,9 +422,43 @@ When the tab bar is positioned on the `left` or `right`, it is styled as a sideb
406422
>
407423
```
408424

409-
<video playsInline autoPlay muted loop data-landscape>
410-
<source src="/assets/7.x/bottom-tabs-side.mp4" />
411-
</video>
425+
</TabItem>
426+
</Tabs>
427+
428+
<img src="/assets/7.x/bottom-tabs-side.png" alt="Sidebar" data-landscape></img>
429+
430+
You can also render a compact sidebar by placing the label below the icon:
431+
432+
<Tabs groupId="config" queryString="config">
433+
<TabItem value="static" label="Static" default>
434+
435+
```js
436+
const Tabs = createBottomTabNavigator({
437+
screenOptions: {
438+
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
439+
tabBarLabelPosition: 'below-icon',
440+
},
441+
442+
// ...
443+
});
444+
```
445+
446+
</TabItem>
447+
<TabItem value="dynamic" label="Dynamic">
448+
449+
```js
450+
<Tab.Navigator
451+
screenOptions={{
452+
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
453+
tabBarLabelPosition: 'below-icon',
454+
}}
455+
>
456+
```
457+
458+
</TabItem>
459+
</Tabs>
460+
461+
![Sidebar](/assets/7.x/bottom-tabs-side-compact.png)
412462

413463
#### `lazy`
414464

0 commit comments

Comments
 (0)