react-native-plus-button-box

1.1.0 • Public • Published

react-native-plus-button-box

A component to display an Android-like "+" button and display action items

Properties

Property Name Type
actions arrayOf(
{
key: string,
onPress: function,
text?: string
}
)
boxColor string
buttonColor string
underlayColor string

Usage

import CallToActionBox from 'react-native-plus-button-box';
 
class MyComp extends Component {
    render() {
        return (
            <CallToActionBox
                actions={[
                    {
                        key: 'test',
                        text: 'Test me',
                        onPress: () => Alert.alert('Hello')
                    },
                    {
                        key: 'test2',
                        text: 'Test me again',
                        onPress: () => Alert.alert('Hello to you too')
                    }
                ]}
            />
        );
    }
}

Result

Closed Open

Package Sidebar

Install

npm i react-native-plus-button-box

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

598 kB

Total Files

10

Last publish

Collaborators

  • evan.glicakis
  • adrienthiery
  • robinwkurtz