2.0.2 • Published 7 years ago
ta-react-masthead v2.0.2
Masthead Component
Display the masthead in standalone projects. This is the "dumb" version, which needs properties to be correctly configured.
Use the Polymorphic Masthead component, if you need a version that's independent from any mandates.
Installation
yarn add ta-react-masthead
Usage
import Masthead from 'ta-react-masthead';
// ...
class YourComponent extends React.Component {
render() {
return (
<Masthead mediaName='tagesanzeiger' homepage='//www.tagesanzeiger.ch'
fullMediaName='Tages-Anzeiger' hashtags={['TAGrafik', 'DDJ']} />
)
}
}
API – 2.0.0
Props
Property | Type | Required | Default | Description |
---|---|---|---|---|
mediaName | string | no | "tagesanzeiger" | The name of the medium the standalone belongs to. |
fullMediaName | string | no | "Tages-Anzeiger" | The name of the medium as it should be presented to readers. |
homepage | string | no | "//www.tagesanzeiger.ch" | The homepage that should be opened when clicking on the logo. |
url | string | no | Extracted from URL | The URL that’s defined for sharing this content. If not provided extracted from project URL. |
hashtags | [string] | no | Array of strings to be used as hashtags when sharing. | |
communities | [Object] | no | Twitter, Facebook | Array of community objects, as delivered by the external services API. A default value is provided. |
inverted | bool | no | false | Use inverted version for dark backgrounds. |