6.0.18 • Published 3 years ago

@bbc/psammead-sitewide-links v6.0.18

Weekly downloads
1,232
License
Apache-2.0
Repository
github
Last release
3 years ago

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

Deprecation notice - this component is no longer being maintained.

Description

The psammead-sitewide-links component is intended to be used at the bottom of an article, serving as a footer, however can be used anywhere on a page. These links are generally intended to be to more general and legal BBC pages, but do not have to be. It also includes information about copyright.

Installation

npm install @bbc/psammead-sitewide-links --save

Props

ArgumentTypeRequiredDefaultExample
linksArray of Link objectsYesN/A[{href:'https://www.bbc.com', text: 'The BBC', lang: 'en-GB'}]
copyrightTextNodeYesN/A<span>@ BBC News</span>
externalLinkLink objectYesN/A{href:'https://www.bbc.com', text: 'The BBC'}
serviceStringYesN/A'news'
trustProjectLinkLink objectNonull{href:'https://www.bbc.co.uk/news', text: 'Why you can trust the bbc'}

Usage

import SitewideLinks from '@bbc/psammead-sitewide-links';

const props = {
  links: [
    { href: 'https://www.bbc.co.uk/news', text: 'BBC News' },
    { href: 'https://www.bbc.co.uk/sport', text: 'BBC Sport' },
    { href: 'https://www.bbc.co.uk/mundo', text: 'BBC Mundo', lang: 'en-GB' },
  ],
  copyrightText: <span>@ BBC News</span>,
  externalLink: { href: 'https://www.bbc.com', text: 'The BBC' },
  service: 'news',
};

const WrappingComponent = () => <SitewideLinks {...props} />;

The typical use-case of this component is at the bottom of BBC pages in a footer element. When this is done it is recommend that the component is wrapped in a contentinfo landmark which denotes content around copyright, privacy and related content.

Example -

<footer role="contentinfo">
  <SitewideLinks service="news" />
</footer>

When to use this component

It is currently used at the bottom of new BBC News and BBC News Persian article pages, however it has no markup requiring this to be its only application. It can be used anywhere on any page.

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 respository.

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.

6.0.18

3 years ago

6.0.17

3 years ago

6.0.16

3 years ago

6.0.15

3 years ago

6.0.14

3 years ago

6.0.13

3 years ago

6.0.12

3 years ago

6.0.11

3 years ago

6.0.10

3 years ago

6.0.9

3 years ago

6.0.7

3 years ago

6.0.8

3 years ago

6.0.6

3 years ago

6.0.5

3 years ago

6.0.4

3 years ago

6.0.3

3 years ago

6.0.2

4 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0-alpha.0

4 years ago

4.0.21

4 years ago

4.0.20

4 years ago

4.0.19

4 years ago

4.0.18

4 years ago

4.0.17

4 years ago

4.0.16

4 years ago

4.0.15

4 years ago

4.0.14

4 years ago

4.0.13

4 years ago

4.0.12

4 years ago

4.0.11

4 years ago

4.0.10

4 years ago

4.0.9

4 years ago

4.0.8

4 years ago

4.0.7

4 years ago

4.0.6

4 years ago

4.0.5

4 years ago

4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.1.20

4 years ago

3.1.19

5 years ago

3.1.18

5 years ago

3.1.17

5 years ago

3.1.16

5 years ago

3.1.15

5 years ago

3.1.14

5 years ago

3.1.13

5 years ago

3.1.12

5 years ago

3.1.11

5 years ago

3.1.10

5 years ago

3.1.9

5 years ago

3.1.8

5 years ago

3.1.7

5 years ago

3.1.6

5 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago