Fixed: OriginalTitle in the API using the Title

New: Change tooltip (title) on movie details to original title
This commit is contained in:
nitsua
2020-08-02 00:43:57 -04:00
committed by Qstick
parent 27844d9f5c
commit 67b4182f4d
3 changed files with 11 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ class Marquee extends Component {
static propTypes = {
text: PropTypes.string,
title: PropTypes.string,
hoverToStop: PropTypes.bool,
loop: PropTypes.bool,
className: PropTypes.string
@@ -16,6 +17,7 @@ class Marquee extends Component {
static defaultProps = {
text: '',
title: '',
hoverToStop: true,
loop: false
};
@@ -144,7 +146,7 @@ class Marquee extends Component {
this.text = el;
}}
style={style}
title={this.props.text}
title={(this.props.title && (this.props.text !== this.props.title)) ? `Original Title: ${this.props.title}` : this.props.text}
>
{this.props.text}
</span>
@@ -167,7 +169,7 @@ class Marquee extends Component {
this.text = el;
}}
style={style}
title={this.props.text}
title={(this.props.title && (this.props.text !== this.props.title)) ? `Original Title: ${this.props.title}` : this.props.text}
>
{this.props.text}
</span>