@ta-interaktiv/react-article-teasers
v4.4.1
Published
Show a row of article teasers according to a list of article IDs.
Downloads
54
Readme
ArticleTeasers
Show a row of article teasers according to a list of article IDs.
Installation
yarn add @ta-interaktiv/react-article-teasers
Usage
Examples
import React from 'react'
import { ArticleTeasers, SortMode } from '@ta-interaktiv/react-article-teasers'
// more code ...
class YourComponent extends React.Component {
render() {
return (
<ArticleTeasers
sorting={SortMode.REVERSE_CHRONOLOGICALLY_BY_CREATION_DATE}
articleIds={['16008934', '21426105', '17814575']}
/>
)
}
}
import React from 'react'
import { ArticleCard } from '@ta-interaktiv/react-article-teasers'
function MyComponent(props) {
return (
<ArticleCard
url='https://www.tagesanzeiger.ch'
imageSrc='https://interaktiv.tagesanzeiger.ch/teaser.jpg'
title='Schlagzeile'
lead='<p>Das müssen Sie gelesen haben.</p>'
authors='Interaktiv-Team'
/>
)
}