mirror of https://github.com/status-im/consul.git
update start script, remove extra tabs code
This commit is contained in:
parent
ddbd372649
commit
5577783da3
|
@ -1,5 +1,4 @@
|
||||||
import TabsBase from '@hashicorp/react-tabs'
|
import { Tabs, Tab } from '@hashicorp/nextjs-scripts/lib/providers/docs'
|
||||||
import s from '@hashicorp/nextjs-scripts/lib/providers/docs/style.module.css'
|
|
||||||
import EnterpriseAlertBase from '@hashicorp/react-enterprise-alert'
|
import EnterpriseAlertBase from '@hashicorp/react-enterprise-alert'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -193,31 +192,6 @@ function isTopLevelKubeKey(name) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copied from https://github.com/hashicorp/nextjs-scripts/blob/04917da2191910d490182250d2828372aa1221c0/lib/providers/docs/index.jsx
|
|
||||||
// because there's no way to import it right now.
|
|
||||||
function Tabs({ children }) {
|
|
||||||
if (!Array.isArray(children))
|
|
||||||
throw new Error('Multiple <Tab> elements required')
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span className={s.tabsRoot}>
|
|
||||||
<TabsBase
|
|
||||||
items={children.map((Block) => ({
|
|
||||||
heading: Block.props.heading,
|
|
||||||
// eslint-disable-next-line react/display-name
|
|
||||||
tabChildren: () => Block,
|
|
||||||
}))}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copied from https://github.com/hashicorp/nextjs-scripts/blob/04917da2191910d490182250d2828372aa1221c0/lib/providers/docs/index.jsx
|
|
||||||
// because there's no way to import it right now.
|
|
||||||
function Tab({ children }) {
|
|
||||||
return <>{children}</>
|
|
||||||
}
|
|
||||||
|
|
||||||
function EnterpriseAlert(props) {
|
function EnterpriseAlert(props) {
|
||||||
return <EnterpriseAlertBase product={'consul'} {...props} />
|
return <EnterpriseAlertBase product={'consul'} {...props} />
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
"generate:component": "next-hashicorp generate component",
|
"generate:component": "next-hashicorp generate component",
|
||||||
"generate:readme": "next-hashicorp markdown-blocks README.md",
|
"generate:readme": "next-hashicorp markdown-blocks README.md",
|
||||||
"lint": "next-hashicorp lint",
|
"lint": "next-hashicorp lint",
|
||||||
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
|
"start": "next-remote-watch ./content/**/*.mdx",
|
||||||
"static": "npm run build && npm run export && cp _redirects out/.",
|
"static": "npm run build && npm run export && cp _redirects out/.",
|
||||||
"linkcheck": "linkcheck https://consul.io"
|
"linkcheck": "linkcheck https://consul.io"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue