mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 06:01:24 +02:00
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
23 lines
645 B
TypeScript
23 lines
645 B
TypeScript
import { forwardRef } from 'react';
|
|
import { Text, TouchableOpacity, TouchableOpacityProps, View } from 'react-native';
|
|
|
|
type ButtonProps = {
|
|
title: string;
|
|
} & TouchableOpacityProps;
|
|
|
|
export const Button = forwardRef<View, ButtonProps>(({ title, ...touchableProps }, ref) => {
|
|
return (
|
|
<TouchableOpacity
|
|
ref={ref}
|
|
{...touchableProps}
|
|
className={`${styles.button} ${touchableProps.className}`}
|
|
>
|
|
<Text className={styles.buttonText}>{title}</Text>
|
|
</TouchableOpacity>
|
|
);
|
|
});
|
|
|
|
const styles = {
|
|
button: 'items-center bg-indigo-500 rounded-[28px] shadow-md p-4',
|
|
buttonText: 'text-white text-lg font-semibold text-center',
|
|
};
|