How to use bpk-component-breakpoint - 10 common examples

To help you get started, we’ve selected a few bpk-component-breakpoint 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 Skyscanner / backpack / packages / bpk-docs / src / layouts / SideNavLayout / SideNavLayout.js View on Github external
};

    const sidebar = (
      
    );

    return (
      <section>
        
          {isTablet =&gt;
            isTablet ? (
              
                  document.getElementById('pagewrap')
                }
                renderTarget={() =&gt; document.getElementById('portal-target')}
                className={getClassName('bpkdocs-side-nav-layout__modal')}
                contentClassName={getClassName(
                  'bpkdocs-side-nav-layout__modal-content',
                )}</section>
github Skyscanner / backpack / packages / bpk-docs / src / pages / BreakpointsPage / BreakpointsPage.js View on Github external
isActive: PropTypes.bool.isRequired,
  children: PropTypes.node.isRequired,
};

const components = [
  {
    id: 'default',
    title: 'Default',
    examples: [
      <div>
        
          {isActive =&gt; (
            MOBILE
          )}
        
        
          {isActive =&gt; (
            TABLET
          )}
        
        
          {isActive =&gt; (
            TABLET ONLY
          )}
        
        
          {isActive =&gt; (
            
              ABOVE MOBILE
            
          )}
        </div>
github Skyscanner / backpack / packages / bpk-docs / src / layouts / NeoSideNavLayout / SideNavLayout.js View on Github external
};

    const sidebar = (
      
    );

    return (
      <section>
        
          {isTablet =&gt;
            isTablet ? (
              
                  document.getElementById('application-container')
                }
                renderTarget={() =&gt; document.getElementById('portal-target')}
                className={getClassName('bpkdocs-side-nav-layout__modal')}
                contentClassName={getClassName(
                  'bpkdocs-side-nav-layout__modal-content',
                )}</section>
github Skyscanner / backpack / packages / bpk-docs / src / layouts / SideNavLayout / SectionsList.js View on Github external
{Object.keys(omitActiveSection(activeSection)).map(section =&gt; (
            
              {isTablet =&gt; (
                 onSectionChange(section)}
                /&gt;
              )}
            
          ))}
github Skyscanner / backpack / packages / bpk-docs / src / layouts / SideNavLayout / Sidebar.js View on Github external
export default (props: Props) =&gt; {
  const {
    activeSection,
    links,
    sectionListExpanded,
    onMobileModalClose,
    onMenuToggle,
    onSectionChange,
  } = props;

  return (
    <nav>
      <div>
        
          {isTablet =&gt;
            isTablet &amp;&amp; (
              
            )
          }
        
        
          <img alt="Backpack Logo" src="{`/${BackpackLogoWhite}`}"></div></nav>
github Skyscanner / backpack / packages / bpk-docs / src / layouts / SideNavLayout / Sidebar.js View on Github external
export default (props: Props) =&gt; {
  const {
    activeSection,
    links,
    sectionListExpanded,
    onMobileModalClose,
    onMenuToggle,
    onSectionChange,
  } = props;

  return (
    <nav>
      <div>
        
          {isTablet =&gt;
            isTablet &amp;&amp; (
              
            )
          }
        
        
          <img alt="Backpack Logo" src="{`/${BackpackLogoWhite}`}"></div></nav>
github Skyscanner / backpack / packages / bpk-docs / src / pages / BreakpointsPage / BreakpointsPage.js View on Github external
TABLET
          )}
        
        
          {isActive =&gt; (
            TABLET ONLY
          )}
        
        
          {isActive =&gt; (
            
              ABOVE MOBILE
            
          )}
        
        
          {isActive =&gt; (
            
              ABOVE TABLET
            
          )}
        
      ,
    ],
  },
];

const blurb = [
  
    The breakpoint component allows information to be displayed in different
    ways depending on the screen size. To simplify things, Backpack uses only
    three breakpoints optimised for mobile, tablet and desktop viewports.
github Skyscanner / backpack / packages / bpk-docs / src / layouts / SideNavLayout / MainHeroImage.js View on Github external
}
  }

  const heroClassNames = getClassName(
    'bpkdocs-main-hero-image',
    !heroImage &amp;&amp; 'bpkdocs-main-hero-image--collapsed',
  );

  const hamburgerMenuClassNames = getClassName(
    'bpkdocs-main-hero-image__hamburger',
    !heroImage &amp;&amp; 'bpkdocs-main-hero-image__hamburger--hero-collapsed',
  );

  return (
    <div style="{heroStyle}">
      
        {aboveTablet =&gt;
          !aboveTablet &amp;&amp; (
            
          )
        }
      
    </div>
  );
};
github Skyscanner / backpack / packages / bpk-docs / src / pages / BreakpointsPage / BreakpointsPage.js View on Github external
return <div>{props.children}</div>;
};

MediaQueryStatus.propTypes = {
  isActive: PropTypes.bool.isRequired,
  children: PropTypes.node.isRequired,
};

const components = [
  {
    id: 'default',
    title: 'Default',
    examples: [
      <div>
        
          {isActive =&gt; (
            MOBILE
          )}
        
        
          {isActive =&gt; (
            TABLET
          )}
        
        
          {isActive =&gt; (
            TABLET ONLY
          )}
        
        
          {isActive =&gt; (</div>
github Skyscanner / backpack / packages / bpk-component-datepicker / src / BpkDatepicker.js View on Github external
formatMonth,
      markOutsideDays,
      markToday,
      maxDate,
      minDate,
      onDateSelect: this.handleDateSelect,
      onMonthChange,
      showWeekendSeparator,
      weekStartsOn,
      initiallyFocusedDate,
    };

    const calendar = ;

    return (
      
        {isMobile =&gt;
          isMobile ? (
            
              {calendar}
            
          ) : (

bpk-component-breakpoint

Backpack breakpoint component.

Apache-2.0
Latest version published 2 years ago

Package Health Score

73 / 100
Full package analysis

Similar packages