@bbc/psammead-byline

3.0.32 • Public • Published

psammead-byline - Known Vulnerabilities Dependency Status peerDependencies Status Storybook GitHub license npm version PRs Welcome

Description

The Byline component is designed to display an author's full name, title, and optional avatar.

Installation

npm install @bbc/psammead-byline --save

Props

Argument Type Required Default Example
service string Yes N/A 'news'
avatar object No null See below.
name string Yes N/A 'John Smith'
title string Yes N/A 'Art editor'

Avatar

Argument Type Required Default Example
src string Yes N/A 'http://www.bbc.co.uk/img.jpg'
alt string No null 'A person wearing glasses.'

Usage

import Byline from "@bbc/psammead-byline"

<Byline
  service='news'
  avatar={{ src: 'http://www.bbc.co.uk/john-smith.jpg' }}
  name="John Smith"
  title="Art editor"
/>

When to use this component

This component should be used when crediting the author of a piece of content, such as an article.

When not to use this component

N/A.

Accessibility notes

By default the avatar img is rendered with an empty alt attribute as it is expected to be of the person, which the adjacent name describes.

Roadmap

There are no known future changes to this component.

Contributing

Psammead is completely open source. We are grateful for any contributions, whether they be new components, bug fixes or general improvements. Please see our primary contributing guide which can be found at the root of the Psammead repository.

Code of Conduct

We welcome feedback and help on this work. By participating in this project, you agree to abide by the code of conduct. Please take a moment to read it.

License

Psammead is Apache 2.0 licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i @bbc/psammead-byline

Weekly Downloads

57

Version

3.0.32

License

Apache-2.0

Unpacked Size

51.7 kB

Total Files

9

Last publish

Collaborators

  • silver-jenkins
  • bbc-web-core
  • iplayer-web-jenkins
  • sport-web-jenkins
  • bbcconnections
  • bbc-gnl-ci
  • bbc-morph
  • itv-ci-machine
  • audienceplatformdev
  • bbc-archivesearch-development-team
  • sounds-web-jenkins
  • rmsdev
  • bbc-voice-pipeline
  • weather-jenkins
  • newslabs-jenkins
  • api-management-jenkins
  • mdtbuild
  • bbc-online
  • cps-support
  • bbc-cd-jenkins
  • locator-deploy
  • bbc-isite
  • participation-jenkins
  • bbc-news-jenkins
  • bbcrd
  • ibl
  • iplayerradio-aws
  • media-playout-jenkins
  • partner-platform-jenkins
  • bbc-admin
  • gel-jenkins
  • pcs-amp-jenkins
  • education-jenkins
  • insyn-jenkins
  • kite-jenkins
  • bbcrd-artifactory
  • iplayer-pc-downloads-pipeline-bot