react-native-gpp-utils

1.1.0 • Public • Published

react-native-gpp-utils

Repositório react-native para manutenção de componentes (criados pelos integrantes da equipe mobile da Go) que serão publicados no npm e utilizados em diversos projetos internos.

Iniciando

$ npm install react-native-gpp-utils --save

ou

$ yarn add react-native-gpp-utils

Usando

OBS: Envolva toda a sua aplicação com o componente Root para que funcione corretamente.

import React, { useState } from 'react'
import { View } from 'react-native'
import { BottomPopUp, Select, Root } from 'react-native-gpp-utils'

const App: React.FC = () => {

    const [visible, setVisible] = useState(true)

    return (
        <Root>
            <View style={{ flex: 1, padding: 10 }}>
                <Select
                    itens={[
                        { label: '1', value: 1 },
                        { label: '2', value: 2 },
                        { label: '3', value: 3 },
                        { label: '4', value: 4 },
                        { label: '5', value: 5 },
                        { label: '6', value: 6 },
                        { label: '7', value: 7 },
                    ]}
                    onSelect={item => {
                        console.log(item)
                    }}
                />

                <BottomPopUp
                    visible={visible}
                    onDismiss={() => setVisible(false)}
                >
                    <View></View>
                </BottomPopUp>
            </View>
        </Root>
    )
}

export default App

Dependencies (4)

Dev Dependencies (17)

Package Sidebar

Install

npm i react-native-gpp-utils

Weekly Downloads

1

Version

1.1.0

License

none

Unpacked Size

22.7 kB

Total Files

15

Last publish

Collaborators

  • ianpvs