1.0.2 • Published 7 years ago

ta-react-polymorphic-copyright-notice v1.0.2

Weekly downloads
4
License
ISC
Repository
gitlab
Last release
7 years ago

Polymorphic Copyright Notice

Displays a copyright notice with the correct icon and media name based on the host name.

Installation

yarn add ta-react-polymorphic-copyright-notice

Usage

import PolymorphicCopyrightNotice from 'ta-react-polymorphic-copyright-notice';

/*
  ... more code ...
 */

class YourComponent extends React.Component {
  render() {

    return (
      <PolymorphicCopyrightNotice />
    )
  }
}

API – 1.0.0

Props

PropertyTypeRequiredDefaultDescription
yearnumbernoCurrent yearThe year that should be displayed in the notice
invertedboolno false Whether the notice should be render inverted for dark backgrounds.

Remarks

In order to show the proper information, this component will poll the mobile2.[mediaName].ch/api/external_services API. If you have other components that poll this endpoint (like Tracking or Sharing), it might be more efficient to poll this endpoint only once and pass the information directly to the stateless Copyright Notice Component.