Skip to content

Commit

Permalink
fix(FEC-10957): CastBeforePlay button is not aligned to the center (#577
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Dan Ziv committed Jan 31, 2021
1 parent efe261e commit e52f990
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
9 changes: 7 additions & 2 deletions src/components/cast-on-tv/_cast-on-tv.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
.player {
.cast-on-tv-button-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
text-align: center;
bottom: 20px;
height: 100%;
opacity: 0;

span {
Expand All @@ -41,6 +42,10 @@
transition: max-width 200ms;
padding: 0 16px;
white-space: nowrap;
position: absolute;
bottom: 0;
transform: translate(-50%, -50%);
left: 50%;

span {
transform: translateX(0px);
Expand Down
32 changes: 15 additions & 17 deletions src/components/cast-on-tv/cast-before-play.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,21 @@ class CastBeforePlay extends Component {
rootStyle.push(style.showCastOnTv);
}
return (
<div>
<div className={rootStyle.join(' ')}>
<Localizer>
<Button
tabIndex="0"
aria-label={<Text id={'cast.play_on_tv'} />}
onClick={() => this.onClick()}
className={[style.btn, style.btnDarkTransparent, style.castOnTvButton].join(' ')}>
<div className={style.castOnTvIconContainer}>
<Icon type={props.icon} />
</div>
<span>
<Text id="cast.play_on_tv" />
</span>
</Button>
</Localizer>
</div>
<div className={rootStyle.join(' ')}>
<Localizer>
<Button
tabIndex="0"
aria-label={<Text id={'cast.play_on_tv'} />}
onClick={() => this.onClick()}
className={[style.btn, style.btnDarkTransparent, style.castOnTvButton].join(' ')}>
<div className={style.castOnTvIconContainer}>
<Icon type={props.icon} />
</div>
<span>
<Text id="cast.play_on_tv" />
</span>
</Button>
</Localizer>
</div>
);
}
Expand Down

0 comments on commit e52f990

Please sign in to comment.