@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.
@@ -5,3 +5,5 @@ export default meta;
5
5
  type Story = StoryObj<typeof Button>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Accent: Story;
8
+ export declare const IconOnly: Story;
9
+ export declare const WithIconAndTitle: Story;
@@ -7,7 +7,8 @@ type ButtonProps = {
7
7
  disabled?: boolean;
8
8
  accessibilityLabel?: string;
9
9
  accessibilityHint?: string;
10
+ icon?: React.ReactNode;
10
11
  testID?: string;
11
12
  };
12
- declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => React.ReactElement;
13
+ declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, icon, testID, }: ButtonProps) => React.ReactElement;
13
14
  export default Button;
package/dist/web.js CHANGED
@@ -8758,6 +8758,7 @@ var useButtonDynamicStyles = function () {
8758
8758
  button: {
8759
8759
  justifyContent: 'center',
8760
8760
  alignItems: 'center',
8761
+ flexDirection: 'row',
8761
8762
  paddingHorizontal: useResponsiveValue(theme.sizes.xxl, theme.sizes.sm, isDesktop, isTablet),
8762
8763
  paddingVertical: theme.sizes.sm,
8763
8764
  alignSelf: 'flex-start'
@@ -8811,6 +8812,7 @@ var Button = function (_a) {
8811
8812
  disabled = _b === void 0 ? false : _b,
8812
8813
  accessibilityLabel = _a.accessibilityLabel,
8813
8814
  accessibilityHint = _a.accessibilityHint,
8815
+ icon = _a.icon,
8814
8816
  testID = _a.testID;
8815
8817
  var theme = useWllSdk().theme;
8816
8818
  var buttonStyle = useButtonStyles(theme, variant);
@@ -8837,7 +8839,7 @@ var Button = function (_a) {
8837
8839
  disabled: disabled
8838
8840
  },
8839
8841
  testID: testID
8840
- }, /*#__PURE__*/React__namespace.createElement(RNText, {
8842
+ }, icon && icon, title && /*#__PURE__*/React__namespace.createElement(RNText, {
8841
8843
  style: [styles.text, textStyle]
8842
8844
  }, title));
8843
8845
  };