How to use the @times-components/context.defaults.theme function in @times-components/context

To help you get started, we’ve selected a few @times-components/context 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 / article-main-comment / article-main-comment.showcase.js View on Github external
{({ article, isLoading, error, refetch }) => {
        // When work is completed in TPA, the schema should do this for us
        const data = {
          ...article,
          template: "maincomment"
        };

        return (
github newsuk / times-components / packages / article-magazine-comment / article-magazine-comment.showcase.js View on Github external
{({ article, isLoading, error, refetch }) => {
      // When work is completed in TPA, the schema should do this for us
      const data = {
        ...article,
        template: "magazinecomment"
      };

      return (
github newsuk / times-components / packages / pages / src / article / article-base.js View on Github external
scale,
  sectionName: pageSection
}) => {
  const { section: articleSection, template } = article || {};
  const section = pageSection || articleSection || "default";
  const adConfig =
    isLoading || error
      ? {}
      : adTargetConfig({
          adTestMode,
          article,
          sectionName: section
        });
  const theme = {
    ...themeFactory(section, template),
    scale: scale || defaults.theme.scale
  };

  const interactiveConfig = {
    dev: devInteractives,
    environment,
    platform: Platform.OS,
    version: appVersion
  };

  return (
github newsuk / times-components / packages / article / showcase-helper.js View on Github external
const data = {
        ...article,
        backgroundColour: inDepthBackgroundColour,
        descriptionMarkup: [article.content.find(m => m.name === "paragraph")],
        template,
        textColour: inDepthTextColour,
        section
      };

      return (
github newsuk / times-components / packages / article-magazine-standard / article-magazine-standard.showcase.js View on Github external
{({ article, isLoading, error, refetch }) => {
      const data = {
        ...article,
        template: "magazinestandard"
      };

      return (
github newsuk / times-components / packages / article-in-depth / article-in-depth.showcase.js View on Github external
alpha: 1,
            blue: 190,
            green: 129,
            red: 60
          }
        },
        template: "indepth",
        textColour: "#FFFFFF"
      };

      return (

@times-components/context

Shared context between components

BSD-3-Clause
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis