How to use the @times-components/styleguide.editionBreakpoints.huge function in @times-components/styleguide

To help you get started, we’ve selected a few @times-components/styleguide 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 newsuk / times-components / packages / slice-layout / __tests__ / sd2np2.base.js View on Github external
test() {
        const output = renderComponent(
          
        );

        expect(output).toMatchSnapshot();
      }
    }
github newsuk / times-components / packages / slice-layout / src / templates / leaders / styles.js View on Github external
flexDirection: "row"
  },
  itemColSeparator: {
    borderColor: colours.functional.keyline,
    borderRightWidth: 1,
    borderStyle: "solid",
    marginTop: spacing(6),
    marginBottom: spacing(12)
  }
};

const stylesResolver = {
  [editionBreakpoints.small]: smallBreakpointStyles,
  [editionBreakpoints.medium]: mediumBreakpointStyles,
  [editionBreakpoints.wide]: wideBreakpointStyles,
  [editionBreakpoints.huge]: wideBreakpointStyles
};

export default breakpoint => stylesResolver[breakpoint];
github newsuk / times-components / packages / edition-slices / src / slices / shared / responsive-slice.js View on Github external
{({ editionBreakpoint }) => {
      switch (editionBreakpoint) {
        case editionBreakpoints.small:
          return renderSmall(editionBreakpoint);
        case editionBreakpoints.medium:
          return {renderMedium(editionBreakpoint)};
        case editionBreakpoints.wide:
          return (
            
              {(renderWide && renderWide(editionBreakpoint)) ||
                (renderMedium && renderMedium(editionBreakpoint))}
            
          );
        case editionBreakpoints.huge:
          return (
            
              
                {(renderHuge && renderHuge(editionBreakpoint)) ||
                  (renderWide && renderWide(editionBreakpoint)) ||
                  (renderMedium && renderMedium(editionBreakpoint))}
              
            
          );
        default:
          return renderSmall(editionBreakpoint);
      }
    }}
github newsuk / times-components / packages / edition-slices / src / tiles / tile-ai / styles / index.js View on Github external
import { spacing, editionBreakpoints } from "@times-components/styleguide";

const keylinePadding = {
  [editionBreakpoints.medium]: spacing(2),
  [editionBreakpoints.wide]: spacing(3),
  [editionBreakpoints.huge]: spacing(3)
};

const styles = breakpoint => ({
  container: {
    alignItems: "center",
    padding: spacing(2),
    paddingLeft: keylinePadding[breakpoint]
  },
  imageContainer: {
    width: "100%"
  }
});

export default styles;
github newsuk / times-components / packages / edition-slices / src / tiles / tile-b / styles / index.js View on Github external
};

const hugeBreakpointStyles = {
  ...wideBreakpointStyles,
  headline: {
    ...wideBreakpointStyles.headline,
    fontSize: 35,
    lineHeight: 35
  }
};

const stylesResolver = {
  [editionBreakpoints.small]: smallBreakpointStyles,
  [editionBreakpoints.medium]: mediumBreakpointStyles,
  [editionBreakpoints.wide]: wideBreakpointStyles,
  [editionBreakpoints.huge]: hugeBreakpointStyles
};

export default breakpoint => stylesResolver[breakpoint];
github newsuk / times-components / packages / slice-layout / src / templates / commentleadandcartoon / styles.js View on Github external
};

const wideBreakpointStyles = {
  ...defaultBreakpointStyles,
  container: {
    flex: 1,
    flexDirection: "row",
    paddingHorizontal: spacing(2),
    paddingVertical: spacing(1)
  }
};

const stylesResolver = {
  [editionBreakpoints.medium]: defaultBreakpointStyles,
  [editionBreakpoints.wide]: wideBreakpointStyles,
  [editionBreakpoints.huge]: wideBreakpointStyles
};

export default breakpoint => stylesResolver[breakpoint];
github newsuk / times-components / packages / edition-slices / src / slices / leaders / styles.js View on Github external
}
};

const wideBreakpointStyles = {
  ...mediumBreakpointStyles,
  container: {
    ...mediumBreakpointStyles.container,
    marginHorizontal: spacing(4)
  }
};

const breakPointsStyles = {
  [editionBreakpoints.small]: smallBreakpointStyles,
  [editionBreakpoints.medium]: mediumBreakpointStyles,
  [editionBreakpoints.wide]: wideBreakpointStyles,
  [editionBreakpoints.huge]: wideBreakpointStyles
};

export default breakpoint => breakPointsStyles[breakpoint];
github newsuk / times-components / packages / edition-slices / src / tiles / tile-n / index.js View on Github external
relativeHorizontalOffset={crop.relativeHorizontalOffset}
          relativeVerticalOffset={crop.relativeVerticalOffset}
          style={styles.imageContainer}
          uri={crop.url}
          fill
          hasVideo={hasVideo}
        />
        
      
      {breakpoint !== editionBreakpoints.huge ? (
        
      ) : null}
    
  );
};