How to use the @times-components/markup-forest function in @times-components/markup-forest

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

        expect(output).toMatchSnapshot();
      }
    },
github newsuk / times-components / packages / markup / __tests__ / shared.base.js View on Github external
test: () => {
        const output = renderComponent(
          
        );

        expect(output).toMatchSnapshot();
      }
    }
github newsuk / times-components / packages / article-byline / src / render-byline.js View on Github external
const renderByline = (Component, ast, textStyle, props = {}) => {
  const bylineAst = ast.map(
    bylineObj =>
      bylineObj.byline && bylineObj.byline.length > 0 ? bylineObj.byline[0] : {}
  );
  return renderTrees(bylineAst, bylineRenderers(Component, textStyle, props));
};
github newsuk / times-components / packages / edition-slices / src / tiles / tile-s / index.js View on Github external
function renderAst(ast) {
  return renderTrees(ast, {
    ...coreRenderers,
    ...renderer
  });
}
github newsuk / times-components / packages / topic / src / topic-head.js View on Github external
const showDescription = () =>
    description.length > 0 ? (
      
        
    ) : null;
github newsuk / times-components / packages / article / src / article-body / article-body.web.js View on Github external
const ArticleBody = ({
  content: bodyContent,
  contextUrl,
  observed,
  registerNode,
  section
}) =>
  renderTrees(
    bodyContent.map(decorateAd({ contextUrl, section })),
    renderers({ observed, registerNode })
  );
github newsuk / times-components / packages / article-summary / src / article-summary.js View on Github external
function renderAst(ast) {
  return renderTrees(summarise(ast), renderer);
}

@times-components/markup-forest

Utility functions for traversing The Times' AST

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

78 / 100
Full package analysis