How to use the @times-components/typeset.AttributedString function in @times-components/typeset

To help you get started, we’ve selected a few @times-components/typeset 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-skeleton / src / article-body / article-body-row.js View on Github external
break() {
      const attr = {
        length: 1,
        start: 0,
        tag: { tag: "FONT", settings: fontConfig.body }
      };
      return new AttributedString("\n", [attr]);
    },
    keyFacts(key, attributes, children, index, tree) {
github newsuk / times-components / packages / article-skeleton / src / article-body / article-body-row.js View on Github external
text(key, attributes) {
      const attr = {
        length: attributes.value.length,
        start: 0,
        tag: { tag: "FONT", settings: fontConfig.body }
      };
      return new AttributedString(attributes.value, [attr]);
    },
    heading2(key, attributes, children, index, tree) {
github newsuk / times-components / packages / article-skeleton / src / article-body / article-body-row.js View on Github external
link(key, { href, canonicalId, type }, children) {
      const childStr = AttributedString.join(children);
      const attr = {
        length: childStr.string.length,
        start: 0,
        tag: { tag: "LINK", href, canonicalId, type, settings: fontConfig.body }
      };
      return new AttributedString(childStr.string, [attr]);
    },
    subscript(key, attributes, children) {

@times-components/typeset

A package for markup layout with arbitrary shapes

BSD-3-Clause
Latest version published 8 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages