How to use the @times-components/styleguide.colours.section 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 / article-byline / shared-showcase.js View on Github external
/* eslint-disable react/prop-types */

import React from "react";
import { View } from "react-native";
import { colours, fonts, fontSizes } from "@times-components/styleguide";

const styles = {
  color: colours.section.comment,
  fontFamily: fonts.supporting,
  fontSize: fontSizes.cardMetaMobile,
  letterSpacing: 0.6,
  lineHeight: 12
};

const authorsAST = require("./fixtures/authors.json");

const preventDefaultedAction = decorateAction =>
  decorateAction([
    ([e, ...args]) => {
      e.preventDefault();
      return ["[SyntheticEvent (storybook prevented default)]", ...args];
    }
  ]);
github newsuk / times-components / packages / article / related-articles / related-article-item.web.js View on Github external
showSummaryContent && 
            }
            datePublicationProps={{ date: publishedTime }}
            headline={() => (
              
                
              
            )}
            labelProps={{
              color: colours.section[section] || colours.section.default,
              title: label
            }}
          />
        
      
    
  );
};
github newsuk / times-components / packages / article-list / src / article-list-item.js View on Github external
bylines
                          ? {
                              ast: bylines,
                              color: colours.section.default
                            }
                          : null
                      }
                      content={this.renderContent}
                      datePublicationProps={{
                        date: publishedTime,
                        publication: publicationName
                      }}
                      headline={this.renderHeadline()}
                      labelProps={{
                        color:
                          colours.section[section] || colours.section.default,
                        isVideo: hasVideo,
                        title: label
                      }}
                    />
                  
                
              
            
          
        )}
github newsuk / times-components / packages / article-list / src / article-list-item.web.js View on Github external
const childProps = {
    bylineProps: bylines
      ? {
          ast: bylines,
          color: colours.section.default
        }
      : null,
    datePublicationProps: {
      date: publishedTime,
      publication: publicationName
    },
    headline: (
      
    ),
    labelProps: {
      color: colours.section[section] || colours.section.default,
      isVideo: hasVideo,
      title: label
    }
  };

  const children = showImage ? (
    }
    />
  ) : (
    
      
        }
github newsuk / times-components / packages / edition-slices / src / slices / dailyregisterleadfour / styles.js View on Github external
imageWrapper: {
    width: 60,
    height: 45
  },
  mastheadLogo: {
    width: 285,
    height: 73,
    marginVertical: spacing(2)
  },
  separator: {
    borderBottomColor: colours.functional.keyline,
    marginVertical: spacing(5),
    width: "100%"
  },
  title: {
    color: colours.section.comment,
    fontFamily: fonts.body,
    fontSize: fontSizes.secondary,
    marginBottom: spacing(5)
  }
};

const mediumBreakpointStyles = {
  container: {
    ...smallBreakpointStyles.container,
    marginHorizontal: spacing(6),
    marginVertical: spacing(3),
    padding: spacing(3)
  },
  column: {
    flex: 1
  },
github newsuk / times-components / packages / related-articles / src / related-article-item.base.js View on Github external
/>
                      );
                    })}
                  
                )
              }
              datePublicationProps={{ date: publishedTime, showDay: false }}
              headline={
                
              }
              labelProps={{
                color: colours.section[section] || colours.section.default,
                isVideo: hasVideo,
                title: label
              }}
            />
          
        
      ),
      onPress
    });
  }
}
github newsuk / times-components / packages / edition-slices / src / tiles / tile-p / styles / index.js View on Github external
import {
  colours,
  fonts,
  fontSizes,
  spacing
} from "@times-components/styleguide";

const styles = {
  bylineOpinion: {
    color: colours.section.comment,
    fontFamily: fonts.supporting,
    fontSize: fontSizes.cardMetaMobile,
    letterSpacing: 0.6,
    lineHeight: 12,
    marginTop: spacing(3),
    textTransform: "uppercase"
  },
  container: {
    alignItems: "center",
    paddingTop: spacing(4),
    paddingBottom: spacing(2)
  },
  headline: {
    color: colours.functional.brandColour,
    fontFamily: fonts.headline,
    fontSize: fontSizes.tileLeadHeadline,
github newsuk / times-components / packages / article-skeleton / showcase-helper.js View on Github external
const selectSection = select =>
  select("Section", pick(colours.section, sections), colours.section.default);