0.1.11 • Published 2 years ago

@dpa-id-components/dpa-media-item v0.1.11

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@dpa-id-components/dpa-media-item

DpaMediaItem Vue 2.x domain sepecific UI component for dpa media genres (i.e. text, picture, graphic, video, audio) based on the dpa Design Kit

Installation

yarn add @dpa-id-components/dpa-media-item

Usage

<!-- SomeComponent.vue using DpaMediaItem -->
<template>
  <dpa-media-item genre="text" is-fulfilled auto-size style="cursor: pointer;">
    <span slot="timePublished">15.11.2021 16:41</span>
    <span slot="description">News Feature im Basisdienst</span>
    <span>BKA-Chef: Cannabis bleibt beliebteste Droge in Deutschland</span>
    <span slot="textLength">104 dpa-Zeilen / 7176 Zeichen</span>
  </dpa-media-item>
</template>

<script>
import DpaMediaItem from "@dpa-id-components/dpa-media-item";
import "@dpa-id-components/dpa-media-item/dist/DpaMediaItem.css";

export default {
  components: { DpaMediaItem }
};
</script>

Demo

View a demo of <dpa-media-item> on Storybook

API

Props

NameTypeRequiredDefaultDescription
genreStringtrueGenre variant; either "text"|"picture"|"graphic"|"video"|"audio"
isFulfilledBooleanflasefalseWhether the media item has been fulfilled/delivered (true), or planned (false)
imgSrcStringflaseThe src attribute of the img tag used for the thumbnail of pictures
imgAltStringflase"Thumbnail"The alt attribute of the img tag used for the thumbnail of pictures
imgCountNumberflase0The number of pictures published in this media coverage item

Slots

NameDescription
defaultslot for the media item's headline/title
timePublishedslot for the media item's time of publishing for fulfilled items
descriptionslot for the media item's description placed above the headline
planningslot for the media item's planning notes (e.g. schedule) placed to the right of the description
textLengthslot for the media item's text length (e.g. schedule) placed below the description/headline
0.1.10

2 years ago

0.1.11

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago