Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@economist/component-articletemplate

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@economist/component-articletemplate

A template with which to render articles

  • 8.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
152
decreased by-5.59%
Maintainers
3
Weekly downloads
 
Created
Source

component-articletemplate

A template with which to render articles

Goals

  • Stateless.
  • Supports different types of article content.
  • Developed so that article variants with radically-different HTML can co-exist.
  • Separation of styling concerns using variant-specific classes.

Design

An ArticleTemplate is a description of how an ArticleHeader, ArticleSubheader, ArticleBody and ArticleFooter should render a page.

By default it will render a very basic article template, however the use of the higher-order components within component-variantify allow the developer to declaratively specify the different article variants. Both ArticleTemplate and ArticleBodyTemplate can be wrapped to this effect.

All inner components receive a generateClassNameList which can have a class name passed into it so they generate additional variant classes. This function is created from the usage of the higher-order component withVariantClassNameList.

Variant-specific ArticleHeader, ArticleSubheader, ArticleBody and ArticleFooter components can be made with help from some basic components exposed where the default components are defined.

Variants

Usage

See example.es6 for usage instructions.

Install

npm install --save @economist/component-articletemplate;

Run tests

npm test;

FAQs

Package last updated on 26 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc