
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-button-lib
Advanced tools
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.
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.
Instale a biblioteca usando npm ou yarn:
npm install react-native-button-lib
# ou
yarn add react-native-button-lib
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;
| Propriedade | Tipo | Obrigatório | Descrição |
|---|---|---|---|
text | string | Sim | O texto exibido no botão. |
onPress | function | Sim | Função a ser executada quando o botão for pressionado. |
style | object | Não | Estilo customizado para o container do botão. |
textStyle | object | Não | Estilo customizado para o texto do botã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.
<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 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.
Este projeto está licenciado sob a Licença MIT. Veja o arquivo LICENSE para mais detalhes.
FAQs
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.