How to use the bpk-component-icon.withLargeButtonAlignment function in bpk-component-icon

To help you get started, we’ve selected a few bpk-component-icon 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-component-loading-button / src / BpkLoadingButton.js View on Github external
const getEnabledIcon = large => {
  const AlignedIcon = large
    ? withLargeButtonAlignment(withRtlSupport(ArrowIconLg))
    : withButtonAlignment(withRtlSupport(ArrowIconSm));
  return ;
};
github Skyscanner / backpack / packages / bpk-docs / src / pages / AlignmentPage / AlignmentPage.js View on Github external
import Code from '../../components/Code';
import CodeBlock from '../../components/CodeBlock';
import * as ROUTES from '../../constants/routes';

const AlignedBaseArrow = withAlignment(
  LongArrowRightIconSm,
  lineHeightBase,
  iconSizeSm,
);
const AlignedLargeArrow = withAlignment(
  LongArrowRightIcon,
  lineHeightLg,
  iconSizeLg,
);
const AlignedButtonArrow = withButtonAlignment(LongArrowRightIconSm);
const AlignedLargeButtonArrow = withLargeButtonAlignment(LongArrowRightIcon);
const AlignedSpan = withAlignment('span', iconSizeLg, lineHeightBase);
const AlignedSpanSmall = withAlignment('span', iconSizeLg, lineHeightSm);

const components = [
  {
    id: 'withinBase',
    title: 'Icon alignment within text with textStyle "base"',
    blurb: [
      
        Aligning an icon within text with textStyle "base" can be done
        using
        <code>withAlignment</code>, providing suitable spacings (see the{' '}
        Typesetting section).
      ,
      Using the HOC is done as follows:,
github Skyscanner / backpack / packages / bpk-component-loading-button / stories.js View on Github external
.add('Custom Icon', () =&gt; {
    const AlignedIconSm = withButtonAlignment(withRtlSupport(BaggageIconSm));
    const iconSm = ;

    const AlignedIconLg = withLargeButtonAlignment(
      withRtlSupport(BaggageIconLg),
    );
    const iconLg = ;

    return (
      <div>
        
          Button
        
        
          Disabled
        </div>
github Skyscanner / backpack / packages / bpk-component-loading-button / src / BpkLoadingButton.js View on Github external
const getEnabledIcon = (large) =&gt; {
  const AlignedIcon = large ?
    withLargeButtonAlignment(withRtlSupport(ArrowIconLg)) :
    withButtonAlignment(withRtlSupport(ArrowIconSm));
  return ;
};