Socket
Book a DemoInstallSign in
Socket

react-native-quick-controls

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-quick-controls

React Native Quick Controls

latest
Source
npmnpm
Version
1.0.15
Version published
Weekly downloads
16
Maintainers
1
Weekly downloads
 
Created
Source

react-native-quick-controls

Getting started

$ npm install react-native-quick-controls --save

Mostly automatic installation

$ react-native link react-native-quick-controls

Usage

import React from "react"
import { View, Text, Image } from "react-native"
import QuickControls from 'react-native-quick-controls';

const QuickControlsApp = props => {

    return (
        <QuickControls
            duration={300}
            landscapeStyle={{ marginTop: 20 }}
            viewMode={val => console.log(val)}
            portraitEndPoint={0.7}
            landscapeEndPoint={0.5}
            children={
                <View style={{ flex: 1 }}>
                    <Text>This is a children component</Text>
                </View>
            }
            parent={
                <Image 
                    style = {{ alignSelf: 'center', width: 25, height: 50, resizeMode: 'contain' }}
                    source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-21-256.png" }}
                />
            }
            first_action={() => console.log("First action pressed!")}
            first_child={<Image 
                style = {{ alignSelf: 'center', width: 36, height: 36, resizeMode: 'contain' }}
                source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-21-256.png" }}
            />}
            second_action={() => console.log("Second action pressed!")}
            second_child={<Image 
                style = {{ alignSelf: 'center', width: 36, height: 36, resizeMode: 'contain' }}
                source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-27-128.png" }}
            />}
            third_action={() => console.log("Third action pressed!")}
            third_child={<Image 
                style = {{ alignSelf: 'center', width: 36, height: 36, resizeMode: 'contain' }}
                source = {{ uri: "https://cdn3.iconfinder.com/data/icons/o-shaped-flag-1/128/O_shaped_asian_flag-16-256.png" }}
            />}
        />
    )

}

Props

PropTypeRequiredDefaultDescription
parentcomponentYesThe parent component
first_childcomponentYesThe first child to show
first_actionActionYesThe action perform after first child clicked
second_childcomponentYesThe second child to show
second_actionActionYesThe action perform after second child clicked
third_childcomponentYesThe third child to show
first_actionActionYesThe action perform after third child clicked
durationmillisecondsNo500The duration of animation
portraitEndPointdoubleNo0.7The limit of the menu can reached in portrait mode
landscapeEndPointdoubleNo0.5The limit of the menu can reached in landscape mode
viewModeFunctionNoCallback function for screen mode changed
commonStylestyleNoCommon style for both portrait and landscape mode
portraitStylestyleNoStyle for portrait mode
landscapeStylestyleNoStyle for landscape mode

MIT Licensed

Keywords

react-native

FAQs

Package last updated on 16 Oct 2020

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.