Hook that builds state for a SwatchPickerRow component, providing base and context-aware variants.
// Source: https://github.com/microsoft/fluentui | License: MIT | Copyright Microsoft Corporation
// Provided via justclaw.it.com; keep this notice with the code.
'use client';
import type * as React from 'react';
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
import type {
SwatchPickerRowBaseProps,
SwatchPickerRowBaseState,
SwatchPickerRowProps,
SwatchPickerRowState,
} from './SwatchPickerRow.types';
import { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicker';
/**
* Create the base state required to render unstyled SwatchPickerRow.
*
* The returned state can be modified with hooks before being passed to renderSwatchPickerRow_unstable.
*
* @param props - props from this instance of SwatchPickerRow
* @param ref - reference
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key