How to use the @times-components/styleguide.themeFactory 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 / 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 / article-in-depth / __tests__ / shared-with-style.native.js View on Github external
const themeForSection = section => ({
  theme: {
    ...themeFactory(section, "indepth"),
    scale: "medium"
  }
});
github newsuk / times-components / packages / article-magazine-comment / __tests__ / shared-with-style.native.js View on Github external
const themeForSection = section => ({
  theme: {
    ...themeFactory(section, "magazinecomment"),
    scale: "medium"
  }
});
github newsuk / times-components / packages / article-in-depth / __tests__ / shared-with-style.web.js View on Github external
const themeForSection = section => ({
  theme: {
    ...themeFactory(section, "magazinecomment"),
    scale: "medium"
  }
});
github newsuk / times-components / packages / article-magazine-standard / __tests__ / shared-with-style.native.js View on Github external
const themeForSection = section => ({
  theme: {
    ...themeFactory(section, "magazinestandard"),
    scale: "medium"
  }
});
github newsuk / times-components / packages / article-magazine-standard / __tests__ / shared-with-style.web.js View on Github external
const themeForSection = section => ({
    theme: {
      ...themeFactory(section, "magazinestandard"),
      scale: "medium"
    }
  });
github newsuk / times-components / packages / article-paragraph / article-paragraph.showcase.js View on Github external
const renderParagraphWithScale = ({ select, boolean }, ast) => {
  const scale = select("Scale", scales, scales.medium);
  const section = select("Section", sections, "The Times Magazine");
  const theme = themeFactory(section, "magazinestandard");
  const enableDropcap = boolean && boolean("Enable DropCap", true);

  return (
    
      {renderTree(ast, {
        ...coreRenderers,
        dropCap(key, { value }) {
          return (
            enableDropcap && (
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 (