@wlloyalty/wll-react-sdk 1.4.9 → 1.4.10

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/dist/index.d.ts CHANGED
@@ -353,9 +353,10 @@ type ButtonProps = {
353
353
  disabled?: boolean;
354
354
  accessibilityLabel?: string;
355
355
  accessibilityHint?: string;
356
+ icon?: React$1.ReactNode;
356
357
  testID?: string;
357
358
  };
358
- declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => React$1.ReactElement;
359
+ declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, icon, testID, }: ButtonProps) => React$1.ReactElement;
359
360
 
360
361
  type IconName = keyof typeof LucideReactIcons;
361
362
  type IconProps = {
package/dist/native.js CHANGED
@@ -2177,6 +2177,7 @@ var useButtonDynamicStyles = function () {
2177
2177
  button: {
2178
2178
  justifyContent: 'center',
2179
2179
  alignItems: 'center',
2180
+ flexDirection: 'row',
2180
2181
  paddingHorizontal: useResponsiveValue(theme.sizes.xxl, theme.sizes.sm, isDesktop, isTablet),
2181
2182
  paddingVertical: theme.sizes.sm,
2182
2183
  alignSelf: 'flex-start',
@@ -2219,12 +2220,12 @@ var useTextStyles = createVariantSystem({}, function (theme) { return ({
2219
2220
  },
2220
2221
  }); });
2221
2222
  var Button = function (_a) {
2222
- var title = _a.title, onPress = _a.onPress, variant = _a.variant, _b = _a.disabled, disabled = _b === void 0 ? false : _b, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, testID = _a.testID;
2223
+ var title = _a.title, onPress = _a.onPress, variant = _a.variant, _b = _a.disabled, disabled = _b === void 0 ? false : _b, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, icon = _a.icon, testID = _a.testID;
2223
2224
  var theme = useWllSdk().theme;
2224
2225
  var buttonStyle = useButtonStyles(theme, variant);
2225
2226
  var textStyle = useTextStyles(theme, variant);
2226
2227
  var styles = useButtonDynamicStyles();
2227
- return (jsxRuntimeExports.jsx(reactNative.Pressable, { style: function (_a) {
2228
+ return (jsxRuntimeExports.jsxs(reactNative.Pressable, { style: function (_a) {
2228
2229
  var pressed = _a.pressed;
2229
2230
  return [
2230
2231
  styles.button,
@@ -2233,7 +2234,7 @@ var Button = function (_a) {
2233
2234
  disabled && { opacity: 0.5 },
2234
2235
  pressed && { opacity: 0.7 },
2235
2236
  ];
2236
- }, onPress: onPress, disabled: disabled, accessible: true, role: "button", accessibilityLabel: accessibilityLabel || title, accessibilityHint: accessibilityHint, accessibilityState: { disabled: disabled }, testID: testID, children: jsxRuntimeExports.jsx(reactNative.Text, { style: [styles.text, textStyle], children: title }) }));
2237
+ }, onPress: onPress, disabled: disabled, accessible: true, role: "button", accessibilityLabel: accessibilityLabel || title, accessibilityHint: accessibilityHint, accessibilityState: { disabled: disabled }, testID: testID, children: [icon && icon, title && jsxRuntimeExports.jsx(reactNative.Text, { style: [styles.text, textStyle], children: title })] }));
2237
2238
  };
2238
2239
 
2239
2240
  var LucideReactNativeIcons;