No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Article Card

A simple card to show Content entities.

Note: An article card must be within a Widget.

Properties

Property NameDescriptionTypeRequired
articleThe article data to showanytrue
onItemClickAction to execute when the item is clicked.(payload: ItemClickedAction) => voidtrue
indexThe position of the item. If, for example, we are showing a grid with multiple articles, should be the order of appearance starting in 0numbertrue

Example


  <ArticleCard
    article={{
          description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
          title: 'Artcile Title',
          image_url: 'https://static.vecteezy.com/system/resources/thumbnails/004/141/669/small/no-photo-or-blank-image-icon-loading-images-or-missing-image-mark-image-not-available-or-image-coming-soon-sign-simple-nature-silhouette-in-frame-isolated-illustration-vector.jpg',
          author: 'Pablo Barrenechea',
      }}
      onItemClick={function(payload) {
          console.log(payload)
      }}
      index={0}
  />
  

Article Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Pablo Barrenechea

Installation

npx sc-search new-component -w -s styled -l typescript -n ArticleCard -o <destination/path>