react-native-mdl-quick-menu
v1.0.1
Published
> A MDL style menu for react native with cross platform support for android and iOS
Downloads
6
Maintainers
Readme
Material design style menu for react native
A MDL style menu for react native with cross platform support for android and iOS
Code Samples
import QuickMenu from './src/QuickMenu'
export default class App extends React.Component {
render() {
const items = [
{
name: "Connections",
icon: "router-wireless"
},
{
name: "Cooking",
icon: "stove"
},
{
name: "Food",
icon: "food"
},
{
name: "Riding",
icon: "motorbike"
}
]
return (
<View style={styles.container}>
<QuickMenu
items={items}
dotColor={'#3E92CC'}
fabColor={'#3E92CC'}
iconColor={'#FFF'}
iconType={'material-community'}
onItemPressed={this.handlePress}
/>
</View>
);
}
handlePress = (item) => console.log(item)
}
Usage
Add
<QuickMenu>
component to the root of your main view
<QuickMenu>
takes the following props:
items
Array of objects to be rendererd withname
andicon
as required keysdotColor
Color of menu item dotsfabColor
Color of main action buttoniconColor
Color of icons in menu items and main action buttoniconType
Icon collection to use for icons rendered fromicon
key in data itemsonItemPressed
Callback for menu item press which receives all the data passed through in menu items
Installation
This project requires expo to run. You can get it here.
Starting the project
npm run start
or if you're using yarn
yarn start
Pull Requests
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request