How to use @synerise/ds-utils - 5 common examples

To help you get started, we’ve selected a few @synerise/ds-utils 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 Synerise / synerise-design / packages / components / tabs / src / __specs__ / Tabs.spec.tsx View on Github external
it('should render tabs container with 3 items', () => {
    // ARRANGE
    const content = <div style="{{width:"> {}} /&gt;</div>;
    const { rerender, queryAllByTestId } = renderWithProvider(content);

    // ACT
    setTimeout(() =&gt; {
      rerender(content);

      // ASSERT
      expect(queryAllByTestId('tab-container').length).toBe(3);
    }, WAIT_FOR_HOOKS)
  });
github Synerise / synerise-design / packages / components / tabs / src / __specs__ / Tabs.spec.tsx View on Github external
it('should render dropdown', () =&gt; {
    // ARRANGE
    const handleConfigurationAction = jest.fn();
    const content = <div style="{{width:"> {}} configuration={{label: 'Button label', action: handleConfigurationAction}} /&gt;</div>;
    const { baseElement } = renderWithProvider(content, { container: document.body});

    // ASSERT
    expect(baseElement.getElementsByClassName('ant-dropdown')).toBeTruthy();
  });
github Synerise / synerise-design / packages / components / inline-edit / src / InlineEdit.tsx View on Github external
if (fontStyleWatcher) {
      attachWidthWatcher(fontStyleWatcher.current as HTMLDivElement, updateInputWidth);
    }
  }, [autoFocus, fontStyleWatcher, inputRef, updateInputWidth]);

  return (
    
      
      {!hideIcon &amp;&amp; (
github Synerise / synerise-design / packages / components / inline-edit / src / __specs__ / InlineEdit.spec.tsx View on Github external
const setup = ({
    disabled = false, 
    maxLength,
    autoComplete,
    name = 'name-of-input',
    hideIcon,
  }: {
    disabled?: boolean,
    maxLength?: number,
    autoComplete?: string,
    name?: string
    hideIcon?: boolean
  }) =&gt; {
  const utils = renderWithProvider(
     onChange(e.target.value)}
      maxLength={maxLength}
      placeholder={PLACEHOLDER}
      size={'normal'}
      error={false}
      disabled={disabled}
      autoComplete={autoComplete}
      hideIcon={hideIcon}
    /&gt;
  )
  const input = utils.getByPlaceholderText(PLACEHOLDER) as HTMLInputElement
github Synerise / synerise-design / packages / components / layout / src / Layout.styles.ts View on Github external
  box-shadow: 0 2px 6px ${(props): string => hexToRgba(props.theme.palette['grey-400'], 0.12)};
`;

@synerise/ds-utils

Utils UI Component for the Synerise Design System

MIT
Latest version published 15 hours ago

Package Health Score

66 / 100
Full package analysis

Similar packages