How to use the uniforms-bootstrap4/gridClassName function in uniforms-bootstrap4

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__ / gridClassName.ts View on Github external
expect(gridClassName({ lg: 9, xs: 8, md: 2, xl: 5 }, 'label')).toBe(
    'col-8 col-md-2 col-lg-9 col-xl-5'
  );
  expect(gridClassName({ xl: 9, lg: 2, md: 5 }, 'label')).toBe(
    'col-5 col-md-5 col-lg-2 col-xl-9'
  );

  expect(gridClassName({ lg: 3 }, 'label')).toBe('col-3 col-lg-3');
  expect(gridClassName({ lg: 5 }, 'label')).toBe('col-5 col-lg-5');
  expect(gridClassName({ lg: 7 }, 'label')).toBe('col-7 col-lg-7');
  expect(gridClassName({ lg: 9 }, 'label')).toBe('col-9 col-lg-9');

  expect(gridClassName({ xl: 3 }, 'label')).toBe('col-3 col-xl-3');
  expect(gridClassName({ xl: 5 }, 'label')).toBe('col-5 col-xl-5');
  expect(gridClassName({ xl: 7 }, 'label')).toBe('col-7 col-xl-7');
  expect(gridClassName({ xl: 9 }, 'label')).toBe('col-9 col-xl-9');
});

uniforms-bootstrap4

Bootstrap4 UI components for uniforms.

MIT
Latest version published 4 days ago

Package Health Score

69 / 100
Full package analysis