// Copyright (c) Meta Platforms, Inc. and affiliates. /** * @file CommandPaletteGroup.tsx * @input Uses React, StyleX * @output Exports CommandPaletteGroup component * @position Sub-component; visual grouping with heading * * SYNC: When modified, update: * - /packages/cli/assets/templates/blocks/components/CommandPalette/ (showcase blocks) */ 'use client'; import type { ReactNode } from 'react'; import * as stylex from "../style-runtime.js"; import type { BaseProps } from "../BaseProps.js"; import { mergeProps } from "../utils/index.js"; import { themeProps } from "../utils/themeProps.js"; import "../theme/tokens.stylex.js"; import { colorVars, spacingVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js"; const styles = { group: { k1xSpc: "x78zum5", kXwgrk: "xdt5ytf", kOIVth: "x1lsbc85", k8WAf4: "xu0wf1k", $$css: true as const } }; export interface CommandPaletteGroupProps extends BaseProps { /** Ref forwarded to the root element. */ ref?: React.Ref; /** Group heading text. */ heading: string; /** Items within this group. */ children: ReactNode; } /** * Visual grouping for command palette items with a heading label. * * Heading style matches DropdownMenu section headings: * supporting-size (12px), secondary color, no uppercase/letterSpacing. * * @compositionHint Place inside CommandPaletteList. * Contains CommandPaletteItem children. * * @example * ``` * * * Home * * * ``` */ export function CommandPaletteGroup({ heading, children, ref, xstyle, className, style, ...props }: CommandPaletteGroupProps) { return
{children}
; } CommandPaletteGroup.displayName = 'CommandPaletteGroup';