0.0.3 • Published 6 years ago

@financial-times/x-eventpromo v0.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

x-eventpromo

This module provides templates for use with n-eventpromo. Eventpromo is used to promote content from live.ft.com.

Installation

This module is compatible with Node 6+ and is distributed on npm.

npm install --save @financial-times/x-eventpromo @financial-times/x-engine

This module also requires x-engine as a peer dependency. The Engine module is used to inject your chosen runtime into the component. Please read the x-engine documentation first if you are consuming x- components for the first time in your application.

Usage

This module is used by n-eventpromo.

Usage example can be found here (uses preact): https://github.com/Financial-Times/n-eventpromo/blob/x-eventpromo/src/index.js

With react

import React from 'react';
import { Eventpromo } from '@financial-times/x-eventpromo';

// A == B == C
const a = Eventpromo(props);
const b = <Eventpromo {...props} />;
const c = React.createElement(Eventpromo, props);

All x- components are designed to be compatible with a variety of runtimes, not just React. Check out the x-engine documentation for a list of recommended libraries and frameworks.

Properties

If not marked optional, fields require non-empty values.

PropertyTypeNotes
isPausedBooleanControl animation state on load
datesStringFree text, can be either a specific date or a date range
idStringEventpromo id, 32 chars
imagesString[]3 image urls, will be passed to origami image service
linkStringEventpromo url, should include segmentId
locationStringNo set format: "London", "New York", "ExCeL London", etc
straplineString
titleString
0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago