@compsych/mobile-ui 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compsych/mobile-ui",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "ComPsych React Native Design System — 19 mobile UI components with self-contained design tokens",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/Card.tsx CHANGED
@@ -20,6 +20,7 @@ export interface CardProps {
20
20
  description?: string;
21
21
  icon?: React.ReactNode;
22
22
  image?: ImageSourcePropType;
23
+ buttonIcon?: React.ReactNode;
23
24
  interactive?: boolean;
24
25
  disabled?: boolean;
25
26
  onPress?: () => void;
@@ -150,6 +151,7 @@ export function Card({
150
151
  description,
151
152
  icon,
152
153
  image,
154
+ buttonIcon,
153
155
  interactive = false,
154
156
  disabled = false,
155
157
  onPress,
@@ -276,6 +278,18 @@ export function Card({
276
278
  {icon && <View style={{ width: s.iconSize, height: s.iconSize }}>{icon}</View>}
277
279
  {textBlock}
278
280
  {children}
281
+ {buttonIcon && (
282
+ <View
283
+ style={{
284
+ position: 'absolute',
285
+ bottom: s.paddingV,
286
+ right: s.paddingH,
287
+ }}
288
+ pointerEvents="none"
289
+ >
290
+ {buttonIcon}
291
+ </View>
292
+ )}
279
293
  </>
280
294
  );
281
295
  }
package/src/PlanCard.tsx CHANGED
@@ -1,6 +1,5 @@
1
- import React, { useRef } from 'react';
1
+ import React from 'react';
2
2
  import {
3
- Animated,
4
3
  LayoutAnimation,
5
4
  Platform,
6
5
  Pressable,
@@ -180,7 +179,9 @@ export function PlanCard({
180
179
  children,
181
180
  }: PlanCardProps) {
182
181
  function handleToggle() {
183
- LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
182
+ if (Platform.OS !== 'web') {
183
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
184
+ }
184
185
  onToggle?.();
185
186
  }
186
187