1.0.0 • Published 2 years ago

@waheed_akhter/react-native-imagebutton v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
2 years ago

@waheed_akhter/react-native-imagebutton

An Image button for react native apps.

import React from "react";
import { View } from "react-native";
import ImageButton from "@waheed_akhter/react-native-imagebutton";

const App = () => {
  return (
    <View style={{ flex: 1, justifyContent: "center" }}>
      <ImageButton
        width={"80%"}
        height={"20%"}
        backgroundColor={"#0f0"}
        borderRadius={50}
        borderWidth={2}
        borderColor={"#ff0"}
        image={require("./assets/img.png")}
        // imageLeft={require("./assets/imageLeft.png")}
        // imageCenter={require("./assets/imageCenter.png")}
        // imageRight={require("./assets/imageRight.png")}
        buttonAlign="center"
        imageResizeMode="stretch"
        text="Press Me!"
        textColor="#fff"
        textWeight="bold"
        textAlign={"center"}
        onPress={() => {
          alert("Button pressed");
        }}
      />
    </View>
  );
};

export default App;
1.0.0

2 years ago