wookoinc / react-native-popover-tooltip

ReactNative component - tooltip menu
MIT License
63 stars 63 forks source link

tooltip opening in left bottom side #29

Open yeomann opened 6 years ago

yeomann commented 6 years ago

can you tell me what is exactly wrong I copy one of your example and been trying couple of ways, whenever I click this just goes to bottom of screen on left side. also it is creating a copy of button as well. I am not sure what is the issue.

Here's the relevant code.

<View
    style={{
        flex: 1,
        alignSelf: "stretch",
        alignItems: "center",
        justifyContent: "flex-start",
        backgroundColor: "#fff"
    }}
>
    <View style={{ height: 40 }} />
    <Text>testing tooltip Effect</Text>
    <PopoverTooltip
        ref="tooltip1"
        setBelow
        buttonComponent={
            <View
                style={{
                    width: 200,
                    height: 50,
                    backgroundColor: "orange",
                    justifyContent: "center",
                    alignItems: "center",
                    borderRadius: 5
                }}
            >
                <Text>Press Me</Text>
            </View>
        }
        items={[
            {
                label: "Item 1",
                onPress: () => {}
            },
            {
                label: "Item 2",
                onPress: () => {}
            }
        ]}
    />
</View>
screen shot 2018-07-20 at 11 13 32