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
Property | Type | Required | Default | Description |
---|---|---|---|---|
year |
number |
no | Current year | The year that should be displayed in the notice |
inverted |
bool |
no | 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.