react-compinators
    Preparing search index...

    Function assumeProp

    • Just like assumeProps but for a single prop.

      Type Parameters

      • Props extends object
      • const Prop extends string

      Parameters

      • Base: FC<Props>

        Base component that will be partially applied.

      • prop: Prop

        prop name from Base props that be fixed to the given value.

      Returns (
          value: Props[Prop],
          maybeNameWrapper?: string,
      ) => FC<Simplify<Omit<Props, Prop>>>

        • (value: Props[Prop], maybeNameWrapper?: string): FC<Simplify<Omit<Props, Prop>>>
        • Parameters

          • value: Props[Prop]

            Prop value that will be partially applied to the variant.

          • OptionalmaybeNameWrapper: string

            Optional displayName wrapper will be added to base component displayName. Default is computed from given prop names.

          Returns FC<Simplify<Omit<Props, Prop>>>