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

react-native-button-lib

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-button-lib

A `react-native-button-lib` é uma biblioteca de componentes React Native projetada para fornecer botões altamente customizáveis e responsivos. Desenvolvida para atender às necessidades de diversos projetos, ela permite uma integração simples e eficiente.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

react-native-button-lib

Descrição

A react-native-button-lib é uma biblioteca de componentes React Native projetada para fornecer botões altamente customizáveis e responsivos. Desenvolvida para atender às necessidades de diversos projetos, ela permite uma integração simples e eficiente.

Instalação

Instale a biblioteca usando npm ou yarn:

npm install react-native-button-lib
# ou
yarn add react-native-button-lib

Uso

Exemplo Básico

import React from 'react';
import { View, StyleSheet } from 'react-native';
import { CustomButton } from 'react-native-button-lib';

const App = () => {
  return (
    <View style={styles.container}>
      <CustomButton
        text="Clique aqui"
        onPress={() => console.log('Botão pressionado!')}
        style={{ backgroundColor: '#6200ee', padding: 10, borderRadius: 5 }}
        textStyle={{ color: '#ffffff', fontSize: 16 }}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#f5f5f5',
  },
});

export default App;

Props Disponíveis

PropriedadeTipoObrigatórioDescrição
textstringSimO texto exibido no botão.
onPressfunctionSimFunção a ser executada quando o botão for pressionado.
styleobjectNãoEstilo customizado para o container do botão.
textStyleobjectNãoEstilo customizado para o texto do botão.

Personalização

Você pode alterar o estilo do botão e do texto usando as props style e textStyle. Combine estas propriedades com as regras de estilo do React Native para criar um botão único que se adapte à sua aplicação.

Exemplo Avançado

<CustomButton
  text="Enviar"
  onPress={() => alert('Mensagem enviada!')}
  style={{
    backgroundColor: 'green',
    padding: 15,
    borderRadius: 10,
    borderWidth: 2,
    borderColor: 'darkgreen',
  }}
  textStyle={{
    fontSize: 18,
    fontWeight: 'bold',
    color: 'white',
  }}
/>

Contribuições

Contribuições são bem-vindas! Se você encontrar problemas ou tiver sugestões de melhorias, sinta-se à vontade para abrir uma issue ou enviar um pull request no repositório oficial.

Licença

Este projeto está licenciado sob a Licença MIT. Veja o arquivo LICENSE para mais detalhes.

FAQs

Package last updated on 20 Dec 2024

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