- Introduced SpoolPreset and User domain models with necessary DTOs and utility functions. - Created AuthRepository, FilamentRepository, and SpoolPresetRepository interfaces for authentication and data management. - Implemented UI components for filament display, including ColorSwatch, FilamentCard, and StockBar. - Developed layout components such as Header and Screen for consistent app structure. - Added reusable UI components like Badge, Button, Card, and Input for better user interaction. - Established global constants and theme settings for consistent styling across the application. - Implemented utility functions for filament calculations and formatting. - Created Zustand stores for managing authentication, filament, and preset states. - Configured TypeScript settings for improved development experience.
29 lines
694 B
TypeScript
29 lines
694 B
TypeScript
import React from 'react';
|
|
import { View, StyleSheet, type ViewProps } from 'react-native';
|
|
import { colors, radius, spacing } from '@shared/theme';
|
|
|
|
interface CardProps extends ViewProps {
|
|
children: React.ReactNode;
|
|
padding?: number;
|
|
}
|
|
|
|
/**
|
|
* Container card com fundo surface e borda sutil.
|
|
*/
|
|
export function Card({ children, padding = spacing[4], style, ...props }: CardProps): React.ReactElement {
|
|
return (
|
|
<View style={[styles.card, { padding }, style]} {...props}>
|
|
{children}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
card: {
|
|
backgroundColor: colors.bgSurface,
|
|
borderRadius: radius.lg,
|
|
borderWidth: 1,
|
|
borderColor: colors.border,
|
|
},
|
|
});
|