Shared component logic for LXP - reusable across React, React Native, and Angular
npm install @lamenna/lxp-shared-componentsShared component logic and types for LXP. This package contains platform-agnostic component logic, interfaces, and utilities that can be consumed by React, React Native, and Angular implementations.
The shared components package exports:
- Component Types: TypeScript interfaces and prop definitions
- Component Logic: Platform-agnostic business logic and utilities
- Component Configuration: Default styles and behavior configurations
Each platform (React, React Native, Angular) imports interfaces and logic from this package and implements platform-specific UI rendering.
```
shared-components/
├── Button/
│ ├── types.ts # ButtonProps interface
│ ├── config.ts # Default configuration
│ ├── logic.ts # Business logic (optional)
│ └── index.ts # Exports
Then in platform-specific packages:
```
react/components/Button/
├── Button.tsx # React implementation using types from shared
react-native/components/Button/
├── Button.tsx # React Native implementation using types from shared
angular/components/button/
├── button.component.ts # Angular implementation using types from shared
- Button: Reusable button component across all platforms
- _Add more components here as they're created_