Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Media Indicator - remove spacing on the low-level component #3062

Merged
merged 15 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/psammead-media-indicator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
| ------- | ----------- |
| 4.0.0 | [PR#3062](https://github.com/bbc/psammead/pull/3062) Pass Time element as a child and remove spacing froom the `MediaIndicatorWrapper`|
DenisHdz marked this conversation as resolved.
Show resolved Hide resolved
| 3.0.0 | [PR#3029](https://github.com/bbc/psammead/pull/3029) Add prop `isInline` for displaying media indicator inline. Remove boolean prop `indexAlsos` since it should be replaced with `isInline` |
| 2.6.27 | [PR#3030](https://github.com/bbc/psammead/pull/3030) Talos - Bump Dependencies - @bbc/psammead-styles, @bbc/psammead-assets |
| 2.6.26 | [PR#2996](https://github.com/bbc/psammead/pull/2996) Talos - Bump Dependencies - @bbc/psammead-assets |
Expand Down
14 changes: 3 additions & 11 deletions packages/components/psammead-media-indicator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ The `MediaIndicator` component provides a 'play', 'audio' or 'camera' icon as we
<!-- prettier-ignore -->
| Argument | Type | Required | Default | Example |
| ---------- | ------- | -------- | ------- | ------------ |
| duration | string | No | Null | '2:15' |
| datetime | string | No | Null | 'PT2M15S' |
| type | string | No | 'video' | 'audio' |
| topStory | boolean | No | false | true |
| service | string | Yes | N/A | `'news'` |
| isInline | boolean | No | false | true |
| children | node | No | null | <IndexAlsos> |
Expand All @@ -32,19 +29,14 @@ The `MediaIndicator` component provides a 'play', 'audio' or 'camera' icon as we

The typical use-case of this component is on top of images within promos for articles that contains a video asset at the top of the page. It indicates to the user that the link is to a video and how long the video is in duration.

For top story promos, we should pass the `topStory` prop to the `Media Indicator` to keep the same padding, otherwise this will be modified under 400px.

Top story promos can also have related stories links called `Index Alsos`. When an Index Also item is a video, audio or photogallery, an icon should be displayed with the content using the `MediaIndicator` component passing the `isInline` prop.

We expect users to add their own spacing around this component where relevant.
OlgaLyubin marked this conversation as resolved.
Show resolved Hide resolved

```jsx
import MediaIndicator from '@bbc/psammead-media-indicator';

<MediaIndicator
duration="2:15"
datetime="PT2M15S"
type="audio"
service="news"
/>;
<MediaIndicator type="audio" service="news" />;
```

### When to use this component
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/psammead-media-indicator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-media-indicator",
"version": "3.0.0",
"version": "4.0.0",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
Loading