Skip to content

Commit

Permalink
Update tab sidebar graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jun 28, 2024
1 parent 35a6db3 commit 3f66a2e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@
transform: scale(0.8);
}

article img {
max-width: 100%;
vertical-align: top;
margin: var(--ifm-leading) 0;
border-radius: var(--ifm-pre-border-radius);
box-shadow: var(--ifm-global-shadow-lw);
}

article video {
width: 300px;
height: auto;
Expand Down
Binary file added static/assets/7.x/bottom-tabs-side-compact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/assets/7.x/bottom-tabs-side.mp4
Binary file not shown.
Binary file added static/assets/7.x/bottom-tabs-side.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 53 additions & 3 deletions versioned_docs/version-7.x/bottom-tab-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,22 @@ Position of the tab bar. Available values are:

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:

<Tabs groupId="config" queryString="config">
<TabItem value="static" label="Static" default>

```js
const Tabs = createBottomTabNavigator({
screenOptions: {
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
},

// ...
});
```

</TabItem>
<TabItem value="dynamic" label="Dynamic">

```js
<Tab.Navigator
screenOptions={{
Expand All @@ -406,9 +422,43 @@ When the tab bar is positioned on the `left` or `right`, it is styled as a sideb
>
```

<video playsInline autoPlay muted loop data-landscape>
<source src="/assets/7.x/bottom-tabs-side.mp4" />
</video>
</TabItem>
</Tabs>

<img src="/assets/7.x/bottom-tabs-side.png" alt="Sidebar" data-landscape></img>

You can also render a compact sidebar by placing the label below the icon:

<Tabs groupId="config" queryString="config">
<TabItem value="static" label="Static" default>

```js
const Tabs = createBottomTabNavigator({
screenOptions: {
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
tabBarLabelPosition: 'below-icon',
},

// ...
});
```

</TabItem>
<TabItem value="dynamic" label="Dynamic">

```js
<Tab.Navigator
screenOptions={{
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
tabBarLabelPosition: 'below-icon',
}}
>
```

</TabItem>
</Tabs>

![Sidebar](/assets/7.x/bottom-tabs-side-compact.png)

#### `lazy`

Expand Down

0 comments on commit 3f66a2e

Please sign in to comment.