npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-rotating-menu

v1.0.2

Published

#### Installation npm install react-native-rotating-menu

Downloads

2

Readme

React native rotating icons

Installation

npm install react-native-rotating-menu

=========== Please note===========

This package needs react-native-gesture-handler to work. Install it before proceeding with this package

This project is a work in progress. Suggestions and issues are always welcomed.

Usage

import React from 'react';
import { Image, StyleSheet, View } from 'react-native';
import RoundMenu from './react-native-rotating-menu';
import facebook from './images/facebook.png';
import google from './images/google.png';
import insta from './images/insta.png';
import speaker from './images/speaker.png';
import twitter from './images/twitter.png';

const style = StyleSheet.create({
  icon: {
    width: 50,
    height: 50,
  },
  centerImage: {
    width: '100%',
    height: '100%'
  }
});

const App = () => {
  const content = [
    <Image source={facebook} resizeMode="contain" style={style.icon} />,
    <Image source={google} resizeMode="contain" style={style.icon} />,
    <Image source={insta} resizeMode="contain" style={style.icon} />,
    <Image source={twitter} resizeMode="contain" style={style.icon} />,
  ]

  return (
    <>
      <RoundMenu
        centerContent={<Image source={speaker} resizeMode="contain" style={style.centerImage} />}
        content={content} />
    </>
  );
};

export default App;

DEMO IMAGE

Props and usage

  • size (number) default value = total width of the device Size of the outer container can be changed. Bear in mind that the size of most of the things inside the package is calculated based on the size prop. So changing this value will also affect the dimensions of the content elements container

    <RoundMenu
        size={300}
        backgroundColor="#EEEEEE"
        centerContent={<Image source={speaker} resizeMode="contain" style={style.centerImage} />}
        content={content} />

    SIZE IMAGE

  • content (JSX elements array) An array of JSX elements to be presented in the circular fashion Place your content elements in this prop as an array. The code will place them in a circular order with equally distant from each other

  • contentContainerStyle (style object) This style object will be applied to the view around the elements which are passed to the content array

      <RoundMenu
          contentContainerStyle={{
            backgroundColor: "#DDDDDD",
            borderRadius: 10,
          }}
          centerContent={<Image source={speaker} resizeMode="contain" style={style.centerImage} />}
          content={content} />

    STYLE IMAGE You can only apply the following styles

    • backgroundColor set the background color of the container (Optional)
    • borderColor set the border color of the container (Optional)
    • borderRadius set the border radius of the container (Optional)
    • borderWidth set the border width of the container (Optional)
  • centerContent (JSX element) This is going to be displayed in the center. For example an image or a view

  • backgroundColor (color string)

    <RoundMenu
        backgroundColor="teal"
        centerContent={<Image source={speaker} resizeMode="contain" style={style.centerImage} />}
        content={content} />

    BGCOLOR IMAGE

  • rotateCenterImage (boolean) If set to true, the center component will also rotate along with the rest of the icons. Defaults to false

    <RoundMenu
          rotateCenterImage
          centerContent={<Image source={speaker} resizeMode="contain" style={style.centerImage} />}
          content={content} />

    ROT IMAGE

  • centerContentSize (number) Center content contianer size. Default value is size/4

     <RoundMenu
          centerContentSize={200}
          centerContent={<Image source={speaker} resizeMode="contain" style={style.centerImage} />}
          content={content} />

    CENTERSIZE IMAGE