// eslint-disable-next-line @typescript-eslint/no-var-requires import getElementTop from "../../utils/get-element-top"; import FeatureFlagValues from "./FeatureFlagValues"; import InternalLink from "../InternalLink"; import styled from "@emotion/styled"; export const TableContainer = styled.div` overflow-x: auto; margin-bottom: 1rem; `; export const Table = styled.table` text-align: center; width: 100%; thead tr { background-color: var(--bg-color-tertiary); } tbody tr th { width: 5rem; } `; export const SummaryRow = styled.tr` th { min-width: 16%; width: 16%; } `; export type FeatureFlags = Record; export type Section = { description: string; features: Record; }; export type FeatureFlag = { description: string; type: "Feature" | "Release" | "Experimental"; valueType: "Boolean" | "Number" | "String"; versionAdded: string; versionDeprecated?: string; deprecationDate?: string; versionRemoved?: string; removalDate?: string; values: Value[]; }; export type Value = { value: string; description: string; defaultNewProject: boolean; defaultExistingProject: boolean; }; export default function FeatureFlagSummary({name, feature}) { return (
{ setTimeout(scroll.bind(undefined, name), 50); return false; }} >

{name}

{feature.description ?

{feature.description}

: undefined}
Type Added Deprecation date Deprecated Removal date Removed
{feature.type} {feature.versionAdded} {feature.deprecationDate} {feature.versionDeprecated} {feature.removalDate} {feature.versionRemoved}
); } const stickyHeaderHeight = 54; function scroll(hash) { const header = document.querySelector(`[id="${hash}"]`); const top = getElementTop(header, stickyHeaderHeight); if (top !== window.scrollY) { window.scrollTo({top}); } }