0.0.3 • Published 6 years ago

react-native-statuslabel v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

react-native-statuslabel

A simple status label control.

alt text

Installation

React Native >= 0.49

yarn add react-native-statuslabel

Attributes

PropDescriptionDefault
string backgroundColorSpecifies the background color of the componenttransparent
string borderColorSpecifies the border color of the component#828186
number borderWidthSpecifies the border width of the component1
number borderRadiusSpecifies the border radius of the component3
number contentPaddingThe text inside the box5
string textColorThe text color#ffffff
string fontFamilyThe font familyundefined
string fontSizeThe font sizeundefined
string fontWeightThe font weightbold
string labelThe text of the labelrequired
object styleA standard style object, refer below for more informationundefined
string themeOne of the following theme strings: red, yellow, blue or greenundefined
boolean upperCaseTransform label text to uppercasetrue

Events

PropDescription
onPressExecuted when the user touches the status label

Examples

Import the component:

import StatusLabel from 'react-native-statuslabel';

Simple Options

<StatusLabel
    label={'Label Text'}
/>

Theme Styles

<StatusLabel
	theme={'red'}
	label={'Red Label'}
    onPress={() => console.log('pressed')}
/>

<StatusLabel
	theme={'blue'}
	label={'Blue Label'}
    onPress={() => console.log('pressed')}
/>

<StatusLabel
	theme={'yellow'}
	label={'Yellow Label'}
    onPress={() => console.log('pressed')}
/>

<StatusLabel
	theme={'green'}
	label={'Green Label'}
    onPress={() => console.log('pressed')}
/>