How to use @times-components/typeset - 10 common examples

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 / __tests__ / shared-tracking.js View on Github external
/* eslint-disable global-require */
import "./mocks.native";

import { FontStorage } from "@times-components/typeset";
import shared from "./shared-tracking.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);
github newsuk / times-components / packages / article-skeleton / __tests__ / images.native.js View on Github external
/* eslint-disable global-require */
import {
  addSerializers,
  compose,
  print,
  minimaliseTransform,
  minimalNativeTransform
} from "@times-components/jest-serializer";
import "./mocks.native";
import { FontStorage } from "@times-components/typeset";
import shared from "./images.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);
github newsuk / times-components / packages / article-skeleton / __tests__ / header-with-style.native.js View on Github external
/* eslint-disable global-require */
import TestRenderer from "react-test-renderer";
import {
  addSerializers,
  compose,
  print,
  minimaliseTransform,
  minimalNativeTransform
} from "@times-components/jest-serializer";
import "./mocks.native";
import { FontStorage } from "@times-components/typeset";
import shared from "./header-with-style.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);
github newsuk / times-components / packages / article-skeleton / __tests__ / images-with-style.native.js View on Github external
import {
  addSerializers,
  compose,
  flattenStyleTransform,
  minimaliseTransform,
  print
} from "@times-components/jest-serializer";
import "./mocks.native";
import { FontStorage } from "@times-components/typeset";
import shared from "./images.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

export default () => {
  addSerializers(
    expect,
    compose(
github newsuk / times-components / packages / article-skeleton / __tests__ / scaling.native.js View on Github external
minimalNativeTransform
} from "@times-components/jest-serializer";
import { iterator } from "@times-components/test-utils";
import "./mocks.native";
import { FontStorage } from "@times-components/typeset";
import snapshotTests from "./scaling.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

export default () => {
  addSerializers(
    expect,
    compose(
      print,
      minimalNativeTransform,
      minimaliseTransform((value, key) => key !== "style"),
      flattenStyleTransform
github newsuk / times-components / packages / article-skeleton / __tests__ / images.native.js View on Github external
import { FontStorage } from "@times-components/typeset";
import shared from "./images.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

const omitKeys = new Set([
  "data",
  "disableVirtualization",
  "horizontal",
  "onViewableItemsChanged",
  "selectable",
  "style",
  "testID",
  "viewabilityConfig",
  "viewabilityConfigCallbackPairs"
]);
github newsuk / times-components / packages / article-skeleton / __tests__ / shared.native.js View on Github external
import { adConfig } from "./ad-mock";
import articleSkeletonProps from "./shared-article-skeleton-props";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

const omitKeys = new Set([
  "data",
  "disableVirtualization",
  "horizontal",
  "onViewableItemsChanged",
  "testID",
  "viewabilityConfig",
  "viewabilityConfigCallbackPairs"
]);

export default () => {
  addSerializers(
github newsuk / times-components / packages / article-skeleton / __tests__ / shared-with-style.native.js View on Github external
print,
  minimaliseTransform,
  minimalNativeTransform
} from "@times-components/jest-serializer";
import "./mocks.native";
import Responsive from "@times-components/responsive";
import { setIsTablet } from "@times-components/mocks/dimensions";
import { FontStorage } from "@times-components/typeset";
import articleFixture from "../fixtures/full-article";
import shared, { renderArticle, fixtureArgs } from "./shared.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

export default () => {
  addSerializers(
    expect,
    compose(
github newsuk / times-components / packages / article-skeleton / __tests__ / header-with-style.native.js View on Github external
minimaliseTransform,
  minimalNativeTransform
} from "@times-components/jest-serializer";
import "./mocks.native";
import { FontStorage } from "@times-components/typeset";
import shared from "./header-with-style.base";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

const omitKeys = new Set([
  "data",
  "disableVirtualization",
  "horizontal",
  "onViewableItemsChanged",
  "style",
  "testID",
  "viewabilityConfig",
github newsuk / times-components / packages / article-skeleton / __tests__ / shared.native.js View on Github external
import shared from "./shared.base";
import ArticleSkeleton from "../src/article-skeleton";
import articleFixture, {
  testFixture,
  nestedContent,
  styledNestedContent,
  longContent
} from "../fixtures/full-article";
import { adConfig } from "./ad-mock";
import articleSkeletonProps from "./shared-article-skeleton-props";

FontStorage.registerFont(
  "TimesDigitalW04-Normal",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Bold",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesDigitalW04-Italic",
  () => require("@times-components/test-utils").TestFont
);
FontStorage.registerFont(
  "TimesModern-Regular",
  () => require("@times-components/test-utils").TestFont
);

const omitKeys = new Set([
  "data",
  "disableVirtualization",
  "horizontal",

@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