mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 07:39:39 +02:00
Restructure the context app (formerly basetext) to follow the monorepo pattern with proper workspace configuration. Changes: - Move app files to apps/context/apps/mobile/ - Rename package to @context/mobile - Update bundle ID to com.manacore.context - Create pnpm-workspace.yaml for project workspace - Add dev scripts to root package.json - Update CLAUDE.md with project documentation The app structure is prepared for future web/backend additions. Note: Existing TypeScript errors in the original codebase are preserved. These should be fixed in a follow-up PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
854 B
TypeScript
30 lines
854 B
TypeScript
import { forwardRef } from 'react';
|
|
import { Text, TouchableOpacity, TouchableOpacityProps, View } from 'react-native';
|
|
|
|
type ButtonProps = {
|
|
title: string;
|
|
textClassName?: string;
|
|
children?: React.ReactNode;
|
|
} & TouchableOpacityProps;
|
|
|
|
export const Button = forwardRef<View, ButtonProps>(
|
|
({ title, textClassName, children, ...touchableProps }, ref) => {
|
|
return (
|
|
<TouchableOpacity
|
|
ref={ref}
|
|
{...touchableProps}
|
|
className={`${styles.button} ${touchableProps.className}`}
|
|
>
|
|
<View className="flex-row items-center justify-center">
|
|
<Text className={`${styles.buttonText} ${textClassName || ''}`}>{title}</Text>
|
|
{children}
|
|
</View>
|
|
</TouchableOpacity>
|
|
);
|
|
}
|
|
);
|
|
|
|
const styles = {
|
|
button: 'items-center bg-indigo-500 rounded-[28px] shadow-md p-4',
|
|
buttonText: 'text-white text-lg font-semibold text-center',
|
|
};
|