0.0.1 • Published 1 year ago

react-native-kumbutton v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-kumbutton

Create Stylish button instantly and efficiently

Installation

Native Cli: npm install react-native-kumbutton

Expo: expo install react-native-kumbutton

Demo

ezgif com-resize (1)

Sample code

import React from 'react'
import {View, Text} from 'react-native'
import {Button} from 'react-native-kumbutton'
export default function App(){
    return(
      <View style={{justifyContent: 'center',alignItems: 'center'}}>
        <Text>Default (Solid)</Text>
        <Button
          text={'Hello world!'}
        />
        <Text>Default (Outline)</Text>
        <Button
          buttonType={'outline'} //default 'solid'
          text={'Hello world!'}
          //default onPress = () => console.log('Button Clicked!')
        />
        <Text>Stylish (Solid)</Text>
        <Button
            buttonType={'solid'}
            style={{borderRadius: 20,borderColor: 'blue',backgroundColor: 'blue',padding: 10}}
            text={'Hello world!'}
            textStyle={{color: 'white',fontSize: 16}}
            clickOpacity={0.4}
            onPress={()=>console.log('Hello world (Solid)')}
          />
          <Text>Stylish (Outline)</Text>
        <Button
            buttonType={'outline'}
            style={{borderRadius: 20,borderColor: 'blue',padding: 10}}
            text={'Hello world!'}
            textStyle={{color: 'blue',fontSize: 16}}
            clickOpacity={0.4}
            onPress={()=>console.log('Hello world (Outline)')}
          />
    </View>
    );
}

Properties

PropsTypeDefaultDescription
buttonTypeString'solid'valid values: 'solid','outline'
styleObjectnull
textString'Click Me!'
textStyleObjectnull
clickOpacityNumber0.2range (0-1)
onPressFunction()=>console.log('Button Clicked!')