How to use the @times-components/context/rnw.defaults.theme function in @times-components/context

To help you get started, we’ve selected a few @times-components/context 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 / ssr / src / component / article.js View on Github external
({ article, isLoading, error, refetch }) =>
          React.createElement(
            ContextProviderWithDefaults,
            {
              value: {
                getCookieValue,
                makeArticleUrl,
                makeTopicUrl,
                newskit: enableNewskit,
                theme: {
                  ...themeFactory(article.section, article.template),
                  scale: scale || defaults.theme.scale
                },
                user: userState
              }
            },
            React.createElement(Article, {
              adConfig: mapArticleToAdConfig(article),
              analyticsStream,
              article,
              error,
              isLoading,
              navigationMode,
              onAuthorPress: () => {},
              onRelatedArticlePress: () => {},
              onTopicPress: () => {},
              refetch,
              spotAccountId,
github newsuk / times-components / packages / ssr / src / component / article.js View on Github external
: providerData.article;

          return React.createElement(
            ContextProviderWithDefaults,
            {
              value: {
                getCookieValue,
                makeArticleUrl,
                makeTopicUrl,
                newskit: enableNewskit,
                theme: {
                  ...themeFactory(
                    getSectionNameFromTiles(article),
                    article.template
                  ),
                  scale: scale || defaults.theme.scale
                },
                user: userState
              }
            },
            React.createElement(Article, {
              adConfig: mapArticleToAdConfig(article),
              analyticsStream,
              article,
              error,
              isLoading,
              logoUrl,
              navigationMode,
              onAuthorPress: () => {},
              onRelatedArticlePress: () => {},
              onTopicPress: () => {},
              refetch,

@times-components/context

Shared context between components

BSD-3-Clause
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis