react-compinators
    Preparing search index...

    Type Alias VariantMap<Props, Defs>

    VariantMap: {
        [N in keyof Defs]: FC<Types.Simplify<Omit<Props, keyof Defs[N]>>>
    }

    A type-level map of variant name to variant props, after the props given in its definition are omitted.

    Type Parameters

    • Props extends object

      Props type for base component.

    • Defs extends VariantDefs<readonly string[], Props>

      Type of variant definitions.

    VariantMap<
    {color: string; text: string},
    VariantDefs<['primary', 'secondary'], {color: string}>
    > = {primary: FC<{text: string}>; secondary: FC<{text: string}>}