Skip to content

Commit a38a146

Browse files
CopilotSaadnajmi
andcommitted
Move macOS API docs to separate navbar item
Co-authored-by: Saadnajmi <[email protected]>
1 parent 8d8c6a3 commit a38a146

File tree

6 files changed

+48
-9
lines changed

6 files changed

+48
-9
lines changed

docsite/api/intro.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
sidebar_position: 1
3+
slug: /
4+
---
5+
6+
# macOS API Reference
7+
8+
Welcome to the React Native macOS API reference documentation. This section covers macOS-specific props and events that extend the standard React Native components.
9+
10+
## View Component Extensions
11+
12+
React Native macOS extends the standard View component with additional props and events designed specifically for macOS:
13+
14+
- **[View Props](./view-props.md)** - macOS-specific properties for customizing view behavior
15+
- **[View Events](./view-events.md)** - macOS-specific events for handling user interactions
16+
17+
These extensions allow you to build truly native macOS experiences while leveraging the React Native framework.
File renamed without changes.
File renamed without changes.

docsite/docs/api-reference/_category_.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

docsite/docusaurus.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ const config: Config = {
4747
],
4848
],
4949

50+
plugins: [
51+
[
52+
'@docusaurus/plugin-content-docs',
53+
{
54+
id: 'api',
55+
path: 'api',
56+
routeBasePath: 'api',
57+
sidebarPath: './sidebarsApi.ts',
58+
editUrl: docsiteUrl + "/",
59+
},
60+
],
61+
],
62+
5063
themeConfig: {
5164
image: 'img/react-logo.svg',
5265
navbar: {
@@ -62,6 +75,13 @@ const config: Config = {
6275
position: 'left',
6376
label: 'Docs',
6477
},
78+
{
79+
type: 'docSidebar',
80+
sidebarId: 'apiSidebar',
81+
docsPluginId: 'api',
82+
position: 'left',
83+
label: 'API',
84+
},
6585
{
6686
label: "Blog",
6787
position: "right",

docsite/sidebarsApi.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
2+
3+
const sidebars: SidebarsConfig = {
4+
apiSidebar: [
5+
'intro',
6+
'view-props',
7+
'view-events',
8+
],
9+
};
10+
11+
export default sidebars;

0 commit comments

Comments
 (0)