Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* more docs work * add changeset
- Loading branch information
Showing
18 changed files
with
385 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'nextra': patch | ||
'nextra-theme-blog': patch | ||
'nextra-theme-docs': patch | ||
--- | ||
|
||
update docs for 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Built-ins | ||
|
||
import { Card, Cards } from '@components/card' | ||
|
||
The Docs Theme includes a couple of built-in components that you can use to better style your documentation: | ||
|
||
<Cards> | ||
<Card icon={ | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6"> | ||
<path strokeLinecap="round" strokeLinejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" /> | ||
</svg> | ||
} title="Callout" href="/docs/docs-theme/built-ins/callout"> | ||
</Card> | ||
<Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6"> | ||
<path strokeLinecap="round" strokeLinejoin="round" d="M6 6.878V6a2.25 2.25 0 012.25-2.25h7.5A2.25 2.25 0 0118 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 004.5 9v.878m13.5-3A2.25 2.25 0 0119.5 9v.878m0 0a2.246 2.246 0 00-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0121 12v6a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 18v-6c0-.98.626-1.813 1.5-2.122" /> | ||
</svg>} title="Tabs" href="/docs/docs-theme/built-ins/tabs"> | ||
</Card> | ||
</Cards> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Tab Component | ||
|
||
A built-in tab component of the Docs Theme. | ||
|
||
## Example | ||
|
||
import { Tab, Tabs } from 'nextra-theme-docs' | ||
|
||
<Tabs items={['pnpm', 'npm', 'yarn']}> | ||
<Tab> | ||
**pNPM**: Fast, disk space efficient package manager. | ||
</Tab> | ||
<Tab> | ||
**npm** is a package manager for the JavaScript programming language. | ||
</Tab> | ||
<Tab> | ||
**Yarn** is a software packaging system. | ||
</Tab> | ||
</Tabs> | ||
|
||
## Usage | ||
|
||
### Default | ||
|
||
```mdx | ||
import { Tab, Tabs } from 'nextra-theme-docs' | ||
|
||
<Tabs items={['pnpm', 'npm', 'yarn']}> | ||
<Tab> | ||
**pNPM**: Fast, disk space efficient package manager. | ||
</Tab> | ||
<Tab> | ||
**npm** is a package manager for the JavaScript programming language. | ||
</Tab> | ||
<Tab> | ||
**Yarn** is a software packaging system. | ||
</Tab> | ||
</Tabs> | ||
``` | ||
|
||
### Default Selected Index | ||
|
||
You can use the `defaultIndex` prop to set the default tab index: | ||
|
||
```mdx /defaultIndex="1"/ | ||
import { Tab, Tabs } from 'nextra-theme-docs' | ||
|
||
<Tabs items={['pnpm', 'npm', 'yarn']} defaultIndex="1"> | ||
... | ||
</Tabs> | ||
``` | ||
|
||
And you will have `npm` as the default tab: | ||
|
||
<Tabs items={['pnpm', 'npm', 'yarn']} defaultIndex="1"> | ||
<Tab> | ||
**pNPM**: Fast, disk space efficient package manager. | ||
</Tab> | ||
<Tab> | ||
**npm** is a package manager for the JavaScript programming language. | ||
</Tab> | ||
<Tab> | ||
**Yarn** is a software packaging system. | ||
</Tab> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.