Files
frigate/docs/src/components/ConfigTabs/index.jsx
T
Josh HawkinsandGitHub 5a5d23b503
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Docs refactor (#22703)
* add generation script

a script to read yaml code blocks from docs markdown files and generate corresponding "Frigate UI" tab instructions based on the json schema, i18n, section configs (hidden fields), and nav mappings

* first pass

* components

* add to gitignore

* second pass

* fix broken anchors

* fixes

* clean up tabs

* version bump

* tweaks

* remove role mapping config from ui
2026-03-30 10:36:45 -06:00

35 lines
816 B
React

import React, { Children, cloneElement } from "react";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
export default function ConfigTabs({ children }) {
const wrapped = Children.map(children, (child) => {
if (child?.props?.value === "ui") {
return cloneElement(child, {
className: "config-tab-ui",
});
}
if (child?.props?.value === "yaml") {
return cloneElement(child, {
className: "config-tab-yaml",
});
}
return child;
});
return (
<div className="config-tabs-wrapper">
<Tabs
groupId="config-method"
defaultValue="ui"
values={[
{ label: "Frigate UI", value: "ui" },
{ label: "YAML", value: "yaml" },
]}
>
{wrapped}
</Tabs>
</div>
);
}