How to use the @shopgate/engage/core.withWidgetSettings function in @shopgate/engage

To help you get started, we’ve selected a few @shopgate/engage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shopgate / pwa / themes / theme-gmd / components / AppBar / presets / DefaultBar / components / Icon / index.jsx View on Github external
* A wrapper component for the AppBarIcon which injects the icon color from the widget settings.
 * @param {Object} props The component props.
 * @returns {JSX}
 */
const AppBarIcon = ({ widgetSettings, ...rest }) => {
  const { buttonColor } = widgetSettings;
  return (
    
  );
};

AppBarIcon.propTypes = {
  widgetSettings: PropTypes.shape().isRequired,
};

export default withWidgetSettings(AppBarIcon, '@shopgate/engage/components/AppBar');
github shopgate / pwa / themes / theme-ios11 / components / AppBar / components / CartButton / index.jsx View on Github external
);
  }
}

export default withWidgetSettings(connect(CartButton), '@shopgate/engage/components/AppBar');
github shopgate / pwa / themes / theme-gmd / components / AppBar / presets / DefaultBar / components / CartButton / index.jsx View on Github external
onClick={navigate}
                  testId="CartButton"
                  aria-label={ariaLabel}
                  aria-hidden={!count}
                />
              
            
            
          
        )}
      
    );
  }
}

export default withWidgetSettings(connect(CartButton), '@shopgate/engage/components/AppBar');
github shopgate / pwa / themes / theme-ios11 / components / AppBar / presets / DefaultBar / index.jsx View on Github external
}

/**
 * The AppBarDefaultWithContext component.
 * @param {Object} props The component props.
 * @returns {JSX}
 */
const AppBarDefaultWithContext = props => (
  
    {({ ariaHidden }) => (
      
    )}
  
);

const WrappedComponent = withApp(withWidgetSettings(
  withRoute(connect(AppBarDefaultWithContext), { prop: 'route' }),
  '@shopgate/engage/components/AppBar'
));

WrappedComponent.Icon = AppBarIcon;

export default WrappedComponent;
github shopgate / pwa / themes / theme-gmd / components / AppBar / presets / DefaultBar / index.jsx View on Github external
}

/**
 * The AppBarDefaultWithContext component.
 * @param {Object} props The component props.
 * @returns {JSX}
 */
const AppBarDefaultWithContext = props => (
  
    {({ ariaHidden }) => (
      
    )}
  
);

const WrappedComponent = withApp(withWidgetSettings(
  withRoute(connect(AppBarDefaultWithContext), { prop: 'route' }),
  '@shopgate/engage/components/AppBar'
));

WrappedComponent.Icon = AppBarIcon;

export default WrappedComponent;