How to use the @zendeskgarden/react-theming.DEFAULT_THEME.breakpoints function in @zendeskgarden/react-theming

To help you get started, we’ve selected a few @zendeskgarden/react-theming 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 zendeskgarden / react-components / packages / grid / src / styled / StyledCol.spec.tsx View on Github external
describe('Responsively', () => {
        Object.keys(DEFAULT_THEME.breakpoints).forEach(breakpoint => {
          it(`renders ${breakpoint}=${size} width`, () => {
            const props = { [breakpoint]: size };
            const { container } = render();
            const minWidth = (DEFAULT_THEME.breakpoints as any)[breakpoint];

            expect(container.firstChild).toHaveStyleRule('max-width', `${(size / 12) * 100}%`, {
              media: `(min-width: ${minWidth})`
            });
          });
        });
      });
    });
github zendeskgarden / react-components / packages / grid / src / styled / StyledCol.spec.tsx View on Github external
describe('Responsively', () => {
        Object.keys(DEFAULT_THEME.breakpoints).forEach(breakpoint => {
          const key = `order${breakpoint[0].toUpperCase()}${breakpoint.substring(1)}`;

          it(`renders ${key}=${order} flex order`, () => {
            const props = { [key]: order };
            const { container } = render();
            const minWidth = (DEFAULT_THEME.breakpoints as any)[breakpoint];

            expect(container.firstChild).toHaveStyleRule(
              'order',
              expect.stringContaining(order.toString()),
              {
                media: `(min-width: ${minWidth})`
              }
            );
          });
        });
github zendeskgarden / react-components / packages / grid / src / styled / StyledRow.spec.tsx View on Github external
describe('Responsively', () => {
        Object.keys(DEFAULT_THEME.breakpoints).forEach(breakpoint => {
          const key = `justifyContent${breakpoint[0].toUpperCase()}${breakpoint.substring(1)}`;

          it(`renders ${key}=${justifyContent} flex justification`, () => {
            const props = { [key]: justifyContent };
            const { container } = render();
            const minWidth = (DEFAULT_THEME.breakpoints as any)[breakpoint];

            expect(container.firstChild).toHaveStyleRule(
              'justify-content',
              expect.stringContaining(justifyContent),
              {
                media: `(min-width: ${minWidth})`
              }
            );
          });
        });
github zendeskgarden / react-components / packages / grid / src / styled / StyledRow.spec.tsx View on Github external
describe('Responsively', () => {
        Object.keys(DEFAULT_THEME.breakpoints).forEach(breakpoint => {
          const key = `alignItems${breakpoint[0].toUpperCase()}${breakpoint.substring(1)}`;

          it(`renders ${key}=${alignItems} flex alignment`, () => {
            const props = { [key]: alignItems };
            const { container } = render();
            const minWidth = (DEFAULT_THEME.breakpoints as any)[breakpoint];

            expect(container.firstChild).toHaveStyleRule(
              'align-items',
              expect.stringContaining(alignItems),
              {
                media: `(min-width: ${minWidth})`
              }
            );
          });
        });