Skip to main content
Glama
react-native-component.tsx1.12 kB
import React from 'react'; import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'; interface ButtonProps { title: string; onPress: () => void; variant?: 'primary' | 'secondary'; } export const Button = ({ title, onPress, variant = 'primary' }: ButtonProps) => { return ( <TouchableOpacity style={[styles.button, variant === 'secondary' && styles.buttonSecondary]} onPress={onPress} > <Text style={[styles.text, variant === 'secondary' && styles.textSecondary]}> {title} </Text> </TouchableOpacity> ); }; const styles = StyleSheet.create({ button: { backgroundColor: '#007AFF', padding: 16, borderRadius: 8, alignItems: 'center', margin: 8, }, buttonSecondary: { backgroundColor: 'transparent', borderWidth: 1, borderColor: '#007AFF', }, text: { color: '#FFFFFF', fontSize: 16, fontWeight: '600', }, textSecondary: { color: '#007AFF', }, }); export default Button;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/millsydotdev/Code-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server