@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
24 lines • 812 B
TypeScript
import * as React from 'react';
import type { Code, VariantCode } from "../CodeHighlighter/types.js";
interface UseVariantSelectionProps {
effectiveCode: Code;
initialVariant?: string;
variantType?: string;
}
export interface UseVariantSelectionResult {
variantKeys: string[];
selectedVariantKey: string;
selectedVariant: VariantCode | null;
selectVariant: React.Dispatch<React.SetStateAction<string>>;
selectVariantProgrammatic: React.Dispatch<React.SetStateAction<string>>;
}
/**
* Hook for managing variant selection and providing variant-related data
* Uses React state as source of truth, with localStorage for persistence
*/
export declare function useVariantSelection({
effectiveCode,
initialVariant,
variantType
}: UseVariantSelectionProps): UseVariantSelectionResult;
export {};