Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Jul 5, 2023
1 parent b596693 commit 1ca47e0
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 91 deletions.
9 changes: 8 additions & 1 deletion docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ export default withNextra({
}
],
webpack(config) {
const allowedSvgRegex = /components\/icons\/.+\.svg$/

const fileLoaderRule = config.module.rules.find(rule =>
rule.test?.test('.svg')
)
fileLoaderRule.exclude = allowedSvgRegex

config.module.rules.push({
test: /\.svg$/,
test: allowedSvgRegex,
use: ['@svgr/webpack']
})
return config
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@vercel/og": "^0.5.0",
"clsx": "^1.2.1",
"framer-motion": "^10.0.0",
"next": "^13.4.6",
"next": "^13.4.8",
"nextra": "workspace:*",
"nextra-theme-docs": "workspace:*",
"react": "^18.2.0",
Expand Down
15 changes: 6 additions & 9 deletions docs/pages/docs/docs-theme/built-ins/tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,24 @@ A built-in tab component of the Docs Theme.

import { Tab, Tabs } from 'nextra-theme-docs'

{/* prettier-ignore */}
<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>**npm** is a package manager for the JavaScript programming language.</Tab>
<Tab>**Yarn** is a software packaging system.</Tab>
</Tabs>

## Usage

### Default

{/* prettier-ignore */}
```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>**npm** is a package manager for the JavaScript programming language.</Tab>
<Tab>**Yarn** is a software packaging system.</Tab>
</Tabs>
```
Expand All @@ -44,10 +42,9 @@ import { Tab, Tabs } from 'nextra-theme-docs'

And you will have `npm` as the default tab:

{/* prettier-ignore */}
<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>**npm** is a package manager for the JavaScript programming language.</Tab>
<Tab>**Yarn** is a software packaging system.</Tab>
</Tabs>
4 changes: 4 additions & 0 deletions docs/pages/showcase/index.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Showcase
---

import { Card, Cards } from 'nextra-theme-docs'

{<h1 className="mt-10 mb-4 text-center text-[2.5rem] font-bold tracking-tight">Showcase</h1>}
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"vercel-build": "yarn workspace nextra run build && yarn workspace nextra-theme-docs run build && yarn build"
},
"dependencies": {
"next": "^13.4.6",
"next": "^13.4.8",
"nextra": "workspace:*",
"nextra-theme-blog": "workspace:*",
"react": "*",
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"vercel-build": "yarn workspace nextra run build && yarn workspace nextra-theme-docs run build && yarn build"
},
"dependencies": {
"next": "^13.4.6",
"next": "^13.4.8",
"nextra": "workspace:*",
"nextra-theme-docs": "workspace:*",
"react": "*",
Expand Down
2 changes: 1 addition & 1 deletion examples/swr-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"intersection-observer": "^0.10.0",
"isomorphic-git": "1.21.0",
"markdown-to-jsx": "^6.11.4",
"next": "^13.4.6",
"next": "^13.4.8",
"nextra": "workspace:*",
"nextra-theme-docs": "workspace:*",
"react": "*",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"react-dom": "^18.2.0",
"@mdx-js/react": "^2.3.0",
"next-themes": "^0.2.1",
"next": "^13.4.6",
"next": "^13.4.8",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"postcss": "^8.4.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"concurrently": "^8.0.0",
"next": "^13.4.6",
"next": "^13.4.8",
"nextra": "workspace:*",
"postcss": "^8.4.21",
"postcss-cli": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@vitejs/plugin-react": "^3.0.1",
"concurrently": "^8.0.0",
"jsdom": "^22.0.0",
"next": "^13.4.6",
"next": "^13.4.8",
"nextra": "workspace:*",
"postcss": "^8.4.21",
"postcss-cli": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"@types/webpack-env": "^1.18.0",
"@vitejs/plugin-react": "^3.0.1",
"fast-glob": "^3.2.12",
"next": "^13.4.6",
"next": "^13.4.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"unified": "^10.1.2",
Expand Down

0 comments on commit 1ca47e0

Please sign in to comment.