update
This commit is contained in:
@@ -5,7 +5,7 @@ import { Palette, Style } from "../styles";
|
||||
import { BlurView } from "expo-blur";
|
||||
import { FONT_FAMILY } from "../styles/Fonts";
|
||||
|
||||
const BorderGradientButton = () => {
|
||||
const BorderGradientButton = ({ title = "J’ai déjà mes paroles" }) => {
|
||||
return (
|
||||
<Pressable>
|
||||
<BorderGradient
|
||||
@@ -42,7 +42,7 @@ const BorderGradientButton = () => {
|
||||
fontFamily: FONT_FAMILY.InterMedium,
|
||||
}}
|
||||
>
|
||||
J’ai déjà mes paroles
|
||||
{title}
|
||||
</Text>
|
||||
</BlurView>
|
||||
</View>
|
||||
|
||||
@@ -9,9 +9,10 @@ const GradientButton = ({
|
||||
colors = ["#F94697", "#7023F7"],
|
||||
onPress,
|
||||
props,
|
||||
containerStyle = {},
|
||||
}) => {
|
||||
return (
|
||||
<Pressable onPress={onPress}>
|
||||
<Pressable onPress={onPress} style={{ ...containerStyle }}>
|
||||
<LinearGradient
|
||||
colors={colors}
|
||||
style={{
|
||||
|
||||
@@ -2,8 +2,13 @@ import { useEffect, useState } from "react";
|
||||
import { View } from "react-native";
|
||||
import { mainBorderRadius } from "../styles/Style";
|
||||
import { Palette } from "../styles";
|
||||
import { LinearGradient } from "./LinearGradient/LinearGradient";
|
||||
|
||||
const ProgressBar = ({ progress = 0, containerStyle = {} }) => {
|
||||
const ProgressBar = ({
|
||||
progress = 0,
|
||||
containerStyle = {},
|
||||
gradient = false,
|
||||
}) => {
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
@@ -15,14 +20,27 @@ const ProgressBar = ({ progress = 0, containerStyle = {} }) => {
|
||||
...containerStyle,
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
width: `${progress}%`,
|
||||
height: "100%",
|
||||
backgroundColor: Palette.white,
|
||||
borderRadius: mainBorderRadius,
|
||||
}}
|
||||
/>
|
||||
{gradient ? (
|
||||
<LinearGradient
|
||||
colors={["#F94697", "#7023F7"]}
|
||||
style={{
|
||||
width: `${progress}%`,
|
||||
height: "100%",
|
||||
borderRadius: mainBorderRadius,
|
||||
}}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 0 }}
|
||||
/>
|
||||
) : (
|
||||
<View
|
||||
style={{
|
||||
width: `${progress}%`,
|
||||
height: "100%",
|
||||
backgroundColor: Palette.white,
|
||||
borderRadius: mainBorderRadius,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user