How to use the wix-ui-core/dist/src/components/button-next/button-next.uni.driver.buttonNextDriverFactory function in wix-ui-core

To help you get started, we’ve selected a few wix-ui-core 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 wix / wix-ui-tpa / src / components / StatesButton / StatesButton.driver.ts View on Github external
export const statesButtonDriverFactory = (
  base: UniDriver,
): StatesButtonDriver => {
  const stylableUtil = new StylableUnidriverUtil(style);

  return {
    ...buttonNextDriverFactory(base),
    checkIconExists: () => base.$('[data-hook="checkIcon"]').exists(),
  };
};
github wix / wix-ui-tpa / src / components / Button / Button.driver.ts View on Github external
export const buttonDriverFactory = (base: UniDriver): ButtonDriver => {
  const stylableUtil = new StylableUnidriverUtil(style);

  return {
    ...buttonNextDriverFactory(base),
    isFullWidth: async () => stylableUtil.hasStyleState(base, 'fullWidth'),
    isMobile: async () => stylableUtil.hasStyleState(base, 'mobile'),
  };
};
github wix / wix-ui-tpa / src / components / TextButton / TextButton.driver.ts View on Github external
export const textButtonDriverFactory = (base: UniDriver): TextButtonDriver => {
  const stylableUtil = new StylableUnidriverUtil(style);

  return {
    ...buttonNextDriverFactory(base),
    isMobile: async () => stylableUtil.hasStyleState(base, 'mobile'),
    hasPriority: async (priority: TEXT_BUTTON_PRIORITY) =>
      (await stylableUtil.getStyleState(base, 'priority')) === priority,
  };
};