How to use the @times-components/styleguide.scales.large 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 / key-facts / __tests__ / shared-key-facts-with-style.native.js View on Github external
it("key facts with title and context theme", () => {
    const scale = scales.large;
    const sectionColour = "#FFFFFF";

    const testInstance = TestRenderer.create(
      
         {}} />
      
    );

    expect(testInstance).toMatchSnapshot();
  });
};
github newsuk / times-components / packages / context / __tests__ / shared.js View on Github external
it("article context with inline values", () => {
    const scale = scales.large;
    const sectionColour = "#FFFFFF";
    const isLoggedIn = false;
    const testInstance = TestRenderer.create(
      
        
          {context => JSON.stringify(context)}
        
      
    );

    expect(testInstance).toMatchSnapshot();
  });
github newsuk / times-components / packages / pages / __tests__ / shared.base.js View on Github external
it("article page", () => {
    expect(
      makeTest(
        <article scale="{scales.large}">
      )
    ).toMatchSnapshot();
  });
</article>
github newsuk / times-components / packages / context / __tests__ / shared.js View on Github external
it("adds defaults to the provided context", () =&gt; {
      const scale = scales.large;
      const sectionColour = "#FFFFFF";
      const isLoggedIn = false;
      const testInstance = TestRenderer.create(
        
          
            {context =&gt; JSON.stringify(context)}
          
        
      );

      expect(testInstance).toMatchSnapshot();
    });
  });
github newsuk / times-components / packages / article-skeleton / __tests__ / scaling.base.js View on Github external
test: () =&gt; {
      const output = renderComponent(
        
           {}}
            data={articleFixture({
              ...testFixture
            })}
            onAuthorPress={() =&gt; {}}
            onCommentGuidelinesPress={() =&gt; {}}
            onCommentsPress={() =&gt; {}}
            onLinkPress={() =&gt; {}}
            onRelatedArticlePress={() =&gt; {}}
            onTopicPress={() =&gt; {}}
            onTwitterLinkPress={() =&gt; {}}
            onVideoPress={() =&gt; {}}
          /&gt;
github newsuk / times-components / packages / article-paragraph / __tests__ / shared.native.js View on Github external
test: async () =&gt; {
        const testInstance = TestRenderer.create(
          
        );

        expect(
          testInstance.root.findAllByType(Text)[0].props.style[0].fontSize
        ).toBe(115);
        testInstance.update(
          
        );

        expect(
          testInstance.root.findAllByType(Text)[0].props.style[0].fontSize
        ).toBe(124);
github newsuk / times-components / packages / article / __tests__ / scaling.base.js View on Github external
test: () =&gt; {
      const output = renderComponent(
        
          <article> {}}
            data={articleFixture({
              ...testFixture
            })}
            onAuthorPress={() =&gt; {}}
            onCommentGuidelinesPress={() =&gt; {}}
            onCommentsPress={() =&gt; {}}
            onLinkPress={() =&gt; {}}
            onRelatedArticlePress={() =&gt; {}}
            onTopicPress={() =&gt; {}}
            onTwitterLinkPress={() =&gt; {}}
            onVideoPress={() =&gt; {}}
          /&gt;</article>
github newsuk / times-components / packages / article-topics / __tests__ / shared-with-style.base.js View on Github external
test: () =&gt; {
        const scale = scales.large;
        const testInstance = TestRenderer.create(
          
             {}} topics={topicData.slice(0, 1)} /&gt;
          
        );

        expect(testInstance).toMatchSnapshot();
      }
    },