Skip to content

exposing type Props#101

Open
fabioguarrasi wants to merge 1 commit intoAndreiCalazans:masterfrom
fabioguarrasi:exposing_type_props
Open

exposing type Props#101
fabioguarrasi wants to merge 1 commit intoAndreiCalazans:masterfrom
fabioguarrasi:exposing_type_props

Conversation

@fabioguarrasi
Copy link

exposing the type Props, will allow an easy way to extend the Tooltip component. Ex

import React from "react";
import RNTooltip, { TooltipProps as RNTooltipProps } from "rn-tooltip";

interface TooltipProps extends Partial<RNTooltipProps> {
  aNewProp: string;
}

const Tooltip: React.FC<TooltipProps> = (props) => {
  return (
    <RNTooltip {...props} actionType="press" withOverlay={false}>
      {props.children}
    </RNTooltip>
  );
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant