How to use the bpk-component-navigation-stack.withNavigationStackState function in bpk-component-navigation-stack

To help you get started, we’ve selected a few bpk-component-navigation-stack 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 / pages / NavigationStackPage / page-components.js View on Github external
BpkNavigationBarIconButton,
} from 'bpk-component-navigation-bar';
import BpkNavigationStack, {
  withNavigationStackState,
} from 'bpk-component-navigation-stack';
import BpkButton from 'bpk-component-button';
import { cssModules } from 'bpk-react-utils';

import STYLES from './NavigationStackPage.scss';

const getClassName = cssModules(STYLES);
const ArrowIconWithRtl = withRtlSupport(ArrowIcon);
const ArrowRightIconWithRtl = withRtlSupport(ArrowRightIcon);

const RtlAwareNavigationStack = updateOnDirectionChange(BpkNavigationStack);
export const StatefulNavigationStack = withNavigationStackState(
  RtlAwareNavigationStack,
);

const BarAndStack = ({
  views,
  pushView,
  popView,
  className,
}: {
  views: Array>,
  pushView: ?(Element) => mixed,
  popView: ?() => mixed,
  className: ?string,
}) => (
  <div>
    </div>
github Skyscanner / backpack / packages / bpk-docs / src / pages / NavigationStackPage / page-components.js View on Github external
}
    /&gt;
    
  
);

BarAndStack.defaultProps = {
  popView: null,
  pushView: null,
  className: null,
};

export const StackWithNavBar = withNavigationStackState(BarAndStack, false);

export const View = ({
  children,
  index,
}: {
  children: ?Node,
  index: number,
}) =&gt; (
  <div>
    {children}
  </div>

bpk-component-navigation-stack

Backpack navigation stack component.

Apache-2.0
Latest version published 3 years ago

Package Health Score

70 / 100
Full package analysis

Popular bpk-component-navigation-stack functions

Similar packages