@ta-interaktiv/react-article-teasers

Show a row of article teasers according to a list of article IDs.

Usage no npm install needed!

<script type="module">
  import taInteraktivReactArticleTeasers from 'https://cdn.skypack.dev/@ta-interaktiv/react-article-teasers';
</script>

README

ArticleTeasers

Show a row of article teasers according to a list of article IDs.

npm version

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'
    />
  )
}

Documentation

Can be found here.