mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-21 19:29:00 +03:00
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
* 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
35 lines
816 B
React
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>
|
|
);
|
|
}
|