Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
⬛ - video player now has Linear Gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
Tdanks2000 committed Dec 11, 2022
1 parent 1c70a54 commit 58e4542
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"expo-device": "~5.0.0",
"expo-font": "~11.0.1",
"expo-keep-awake": "~11.0.1",
"expo-linear-gradient": "~12.0.1",
"expo-linking": "~3.2.3",
"expo-navigation-bar": "~2.0.1",
"expo-random": "~13.0.0",
Expand Down
16 changes: 13 additions & 3 deletions src/components/Player/Controls/Controls.styles.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LinearGradient } from "expo-linear-gradient";
import styled from "styled-components/native";

export const Container = styled.View`
Expand All @@ -9,7 +10,11 @@ export const Container = styled.View`
opacity: ${({ hideControls }) => (!hideControls ? 1 : 0)};
`;

export const WrapperWithBg = styled.View`
export const WrapperWithBg = styled(LinearGradient).attrs(() => ({
colors: ["rgba(0, 0, 0, 0.05)", "rgba(0, 0, 0, 0.45)"],
start: { x: 0, y: 0 },
end: { x: 0, y: 1 },
}))`
position: absolute;
bottom: 0;
left: 0;
Expand All @@ -28,12 +33,17 @@ export const WrapperFlex = styled.View`
margin-top: 10px;
`;

export const GoBackWrapper = styled.View`
export const GoBackWrapper = styled(LinearGradient).attrs(() => ({
colors: ["rgba(0, 0, 0, 0.05)", "rgba(0, 0, 0, 0.45)"],
start: { x: 0, y: 1 },
end: { x: 0, y: 0 },
}))`
position: absolute;
top: 0;
left: 0;
margin: 15px;
padding: 15px;
z-index: 10;
width: 100%;
`;

export const FlexBox = styled.View`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const CanPressIcon = styled.TouchableOpacity``;
export const PlayIcon = styled(IconItem).attrs({
name: "play",
})`
margin: 0 130px;
margin: 0 75px;
`;

export const PauseIcon = styled(IconItem).attrs({
Expand Down
1 change: 1 addition & 0 deletions src/components/Player/Controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
EpisodeTitle,
EpisodeNumber,
FlexBox,
WrapperWithBgTop,
} from "./Controls.styles";
import { IconItem, PressableIcon } from "../styles";
import { useNavigation } from "@react-navigation/native";
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4506,6 +4506,11 @@ expo-keep-awake@~11.0.1:
resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-11.0.1.tgz#ee354465892a94040ffe09901b85b469e7d54fb3"
integrity sha512-44ZjgLE4lnce2d40Pv8xsjMVc6R5GvgHOwZfkLYtGmgYG9TYrEJeEj5UfSeweXPL3pBFhXKfFU8xpGYMaHdP0A==

expo-linear-gradient@~12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/expo-linear-gradient/-/expo-linear-gradient-12.0.1.tgz#452f793b0463ddf313aad431552f23acc85f5d64"
integrity sha512-TMl/wBTVQOliL4S3DS5Aa3UFfVySr0mdJEHLG6kfBdMCLkr+tfLI2rGyJ+scS7xgMsvhTIaurhf1+Z0sL3aLCg==

expo-linking@~3.2.0, expo-linking@~3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/expo-linking/-/expo-linking-3.2.3.tgz#7b493a7fea2aadafc88a42e2fc6a5a4ba6d47df9"
Expand Down

0 comments on commit 58e4542

Please sign in to comment.