@@ -7,7 +7,6 @@ import { background } from "../assets";
|
||||
import BorderGradientButton from "../components/BorderGradientButton";
|
||||
import GradientButton from "../components/GradientButton";
|
||||
import { Input } from "../components/Input";
|
||||
import AppCheckbox from "../components/AppCheckbox";
|
||||
import ItemContainer from "../components/ItemContainer/ItemContainer";
|
||||
import {
|
||||
checkIfPasswordIsStrongEnough,
|
||||
@@ -56,6 +55,10 @@ const CreatePassword = () => {
|
||||
|
||||
const isPasswordValid = checkIfPasswordIsStrongEnough({ password });
|
||||
|
||||
const handleToggleCguAccepted = () => {
|
||||
setIsCguAccepted((prev) => !prev);
|
||||
};
|
||||
|
||||
const handleOpenCguModal = () => {
|
||||
setHasScrolledCguToEnd(false);
|
||||
setIsCguModalVisible(true);
|
||||
@@ -207,9 +210,49 @@ const CreatePassword = () => {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
gap: 8,
|
||||
flexWrap: "wrap",
|
||||
}}
|
||||
>
|
||||
<AppCheckbox selected={isCguAccepted} />
|
||||
<Pressable
|
||||
onPress={handleToggleCguAccepted}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
gap: 8,
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
width: 17,
|
||||
height: 17,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
borderWidth: 1,
|
||||
borderRadius: 100,
|
||||
borderColor: Palette.white,
|
||||
}}
|
||||
>
|
||||
{isCguAccepted ? (
|
||||
<View
|
||||
style={{
|
||||
width: 9,
|
||||
height: 9,
|
||||
borderRadius: 100,
|
||||
backgroundColor: Palette.white,
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</View>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 14,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterRegular,
|
||||
}}
|
||||
>
|
||||
J'accepte les
|
||||
</Text>
|
||||
</Pressable>
|
||||
<Pressable onPress={handleOpenCguModal}>
|
||||
<Text
|
||||
style={{
|
||||
@@ -219,7 +262,7 @@ const CreatePassword = () => {
|
||||
textDecorationLine: "underline",
|
||||
}}
|
||||
>
|
||||
Voir les CGU
|
||||
CGU
|
||||
</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user