How to use uniforms-bootstrap4 - 10 common examples

To help you get started, we’ve selected a few uniforms-bootstrap4 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 vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - object', () => {
  expect(gridClassName({ md: 3 }, 'input')).toBe('col-9 col-md-9');
  expect(gridClassName({ md: 5 }, 'input')).toBe('col-7 col-md-7');
  expect(gridClassName({ md: 7 }, 'input')).toBe('col-5 col-md-5');
  expect(gridClassName({ md: 9 }, 'input')).toBe('col-3 col-md-3');
  expect(gridClassName({ md: 3, xs: 2 }, 'input')).toBe('col-10 col-md-9');
  expect(gridClassName({ md: 5, xs: 4 }, 'input')).toBe('col-8 col-md-7');
  expect(gridClassName({ md: 7, xs: 6 }, 'input')).toBe('col-6 col-md-5');
  expect(gridClassName({ md: 9, xs: 8 }, 'input')).toBe('col-4 col-md-3');
  expect(gridClassName({ sm: 11, md: 9, xs: 8, xl: 2, lg: 5 }, 'input')).toBe(
    'col-4 col-sm-1 col-md-3 col-lg-7 col-xl-10'
  );
  expect(gridClassName({ xl: 2, lg: 5, md: 9, sm: 11, xs: 8 }, 'input')).toBe(
    'col-4 col-sm-1 col-md-3 col-lg-7 col-xl-10'
  );
  expect(gridClassName({ lg: 9, xs: 8, md: 2, xl: 5 }, 'input')).toBe(
    'col-4 col-md-10 col-lg-3 col-xl-7'
  );
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - number', () => {
  expect(gridClassName(3, 'input')).toBe('col-9');
  expect(gridClassName(3, 'label')).toBe('col-3');
  expect(gridClassName(5, 'input')).toBe('col-7');
  expect(gridClassName(5, 'label')).toBe('col-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - string', () => {
  expect(gridClassName('col-9 col-md-9')).toBe('col-9 col-md-9');
  expect(gridClassName('col-3 col-md-3')).toBe('col-3 col-md-3');
  expect(gridClassName('col-7 col-md-7')).toBe('col-7 col-md-7');
  expect(gridClassName('col-5 col-md-5')).toBe('col-5 col-md-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - number', () => {
  expect(gridClassName(3, 'input')).toBe('col-9');
  expect(gridClassName(3, 'label')).toBe('col-3');
  expect(gridClassName(5, 'input')).toBe('col-7');
  expect(gridClassName(5, 'label')).toBe('col-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - number (string)', () => {
  expect(gridClassName('3', 'input')).toBe('col-9');
  expect(gridClassName('3', 'label')).toBe('col-3');
  expect(gridClassName('5', 'input')).toBe('col-7');
  expect(gridClassName('5', 'label')).toBe('col-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - number', () => {
  expect(gridClassName(3, 'input')).toBe('col-9');
  expect(gridClassName(3, 'label')).toBe('col-3');
  expect(gridClassName(5, 'input')).toBe('col-7');
  expect(gridClassName(5, 'label')).toBe('col-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - string', () => {
  expect(gridClassName('col-9 col-md-9')).toBe('col-9 col-md-9');
  expect(gridClassName('col-3 col-md-3')).toBe('col-3 col-md-3');
  expect(gridClassName('col-7 col-md-7')).toBe('col-7 col-md-7');
  expect(gridClassName('col-5 col-md-5')).toBe('col-5 col-md-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - number (string)', () => {
  expect(gridClassName('3', 'input')).toBe('col-9');
  expect(gridClassName('3', 'label')).toBe('col-3');
  expect(gridClassName('5', 'input')).toBe('col-7');
  expect(gridClassName('5', 'label')).toBe('col-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / gridClassName.ts View on Github external
test('gridClassName - string', () => {
  expect(gridClassName('col-9 col-md-9')).toBe('col-9 col-md-9');
  expect(gridClassName('col-3 col-md-3')).toBe('col-3 col-md-3');
  expect(gridClassName('col-7 col-md-7')).toBe('col-7 col-md-7');
  expect(gridClassName('col-5 col-md-5')).toBe('col-5 col-md-5');
});
github vazco / uniforms / packages / uniforms-bootstrap4 / __tests__ / wrapField.tsx View on Github external
test(' - renders error block (showInlineError=false)', () => {
  const error = new Error();
  const element = wrapField(
    { error, showInlineError: false, errorMessage: 'Error' },
    <div>,
  );
  const wrapper = mount(element);

  expect(wrapper.find('.text-danger')).toHaveLength(0);
});
</div>

uniforms-bootstrap4

Bootstrap4 UI components for uniforms.

MIT
Latest version published 3 days ago

Package Health Score

69 / 100
Full package analysis