New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-toolbox

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-toolbox

This is set of common react-native tools.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

react-native-toolbox

This is set of common react-native tools.

Hopefully it'll grow with time.

yarn add react-native-toolbox

Quick showcase

import {
  alertPromise,
  confirmChoice,
  showActionSheetIOS,
  waitForInteractionsToEnd,
} from 'react-native-toolbox';

class SomeComponent extends Component {
  async showAlert() {
    await alertPromise({
      title: 'Title',
      message: 'Message',
      closeLabel: 'Close',
    });
    console.log('alert is closed now');
  }

  async deleteSomething() {
    const isConfirmed = await confirmChoice({
      title: 'Are you sure?',
      subtitle: 'This cannot be undone',
      confirmLabel: 'Remove',
      cancelLabel: 'Cancel',
      isDestructive: true, // will make 'Remove' red
    });

    if (isConfirmed) {
      callSomeRemoveApi();
    }
  }

  showActionSheet() {
    showActionSheetIOS({
      title: 'Title',
      message: 'Some message',
      options: [
        {
          label: 'Option A',
          isDestructive: false,
          selectCallback: () => console.log('Option A selected'),
        },
        {
          label: 'Option A',
          isDestructive: true,
          selectCallback: () => console.log('Option B selected'),
        },
      ],
      cancelLabel: 'Cancel',
      onCancel: () => console.log('cancelled'),
    });
  }

  async someActionThatHasToBeSmooth() {
    await waitForInteractionsToEnd();

    // perform heavy operation
  }
}

FAQs

Package last updated on 21 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts