14.7.4 • Published 2 days ago

@financial-times/x-teaser-list v14.7.4

Weekly downloads
458
License
ISC
Repository
github
Last release
2 days ago

x-teaser-list

Renders a simple list of content teasers, with optional save buttons.

Installation

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

npm install --save @financial-times/x-teaser-list

The x-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.

Other dependencies

o-teaser styles will need to be imported by the consumer of this component.

If selectively importing o-teaser's styles via scss, then you will need the following:

$o-teaser-is-silent: true;
@import '@financial-times/o-teaser/main';
@include oTeaser(('default'), ('small'));

Usage

The components provided by this module are all functions that expect a map of properties. They can be used with vanilla JavaScript or JSX (If you are not familiar check out WTF is JSX first). For example if you were writing your application using React you could use the component like this:

import React from 'react'
import { TeaserList } from '@financial-times/x-teaser-list'

// A == B == C
const a = TeaserList(props)
const b = <TeaserList {...props} />
const c = React.createElement(TeaserList, 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.

Props

FeatureTypeNotes
itemsArrayArray of objects representing content items in Teaser format.
showSaveButtonsBooleanDefault = true. Whether to show the save buttons.
csrfTokenStringCross-site Request Forgery token. Required if save buttons are shown.
14.7.4

2 days ago

14.7.3

8 days ago

14.7.2

23 days ago

14.7.1

1 month ago

14.7.0

1 month ago

14.6.5

1 month ago

14.6.3

2 months ago

14.6.4

2 months ago

14.6.2

2 months ago

14.6.0

2 months ago

14.6.1

2 months ago

14.5.2

3 months ago

14.5.0

3 months ago

14.5.1

3 months ago

14.4.2

3 months ago

14.4.1

4 months ago

14.4.0

4 months ago

14.3.1

4 months ago

14.3.0

4 months ago

14.2.0

5 months ago

12.0.0-beta.2

11 months ago

12.0.0-beta.3

10 months ago

12.0.0-beta.1

11 months ago

14.1.0

6 months ago

14.1.1

6 months ago

14.1.2

6 months ago

12.0.0

10 months ago

12.0.1

10 months ago

12.0.2

9 months ago

11.2.0

11 months ago

12.0.1-beta.1

11 months ago

14.0.0

9 months ago

14.0.1

8 months ago

13.0.0

9 months ago

14.0.2

8 months ago

13.0.1

9 months ago

14.0.3

8 months ago

14.0.4

7 months ago

11.1.1

12 months ago

11.1.2

11 months ago

11.1.0

12 months ago

10.5.0

1 year ago

10.4.0

1 year ago

11.0.0

1 year ago

10.3.0

1 year ago

10.0.0

1 year ago

10.1.0

1 year ago

10.2.0

1 year ago

10.1.1

1 year ago

10.1.2

1 year ago

8.2.3

1 year ago

8.2.2

2 years ago

8.2.5

1 year ago

8.2.4

1 year ago

8.2.1

2 years ago

8.2.0

2 years ago

8.1.1

2 years ago

8.1.0

2 years ago

8.0.3

2 years ago

8.0.2

2 years ago

8.0.5

2 years ago

8.0.4

2 years ago

8.0.6

2 years ago

6.8.2-beta.1

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

8.0.1-beta.1

2 years ago

6.8.1

2 years ago

7.0.0

2 years ago

6.8.0

2 years ago

0.0.9

2 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

6 years ago