Article Teasers
Show a row of article teasers according to a list of article IDs.
Version: 1.0
- [Article Teasers](#module_Article Teasers)
- [module.exports](#exp_module_Article Teasers--module.exports) ⇐
React.PureComponent
⏏ - [new module.exports()](#new_module_Article Teasers--module.exports_new)
- [module.exports](#exp_module_Article Teasers--module.exports) ⇐
React.PureComponent
⏏
module.exports ⇐ Kind: Exported class
Extends: React.PureComponent
new module.exports()
Param | Type | Default | Description |
---|---|---|---|
props.articleIds | Array.<string> |
An array of CD article IDs, as strings. | |
[props.numberOfCards] | string |
"two" |
How many article teaser should be shown in a row on desktop devices. As a number word. ('one', 'two', 'three', etc.) |
[props.additionalClasses=] | string |
Additional classes to be passed to the cards element. As defined in the Card documentation. |
Installation
yarn add ta-react-article-teasers
Usage
import ArticleTeasers from 'ta-react-article-teasers';
// more code ...
class YourComponent extends React.Component {
render() {
return (
<ArticleTeasers
articleIds={["16008934", "21426105", "17814575"]}/>
)
}
}