Skip to content

Commit

Permalink
[#4] Dietary Restriction Implementation
Browse files Browse the repository at this point in the history
Filtered recipes in the app based on user's selection from the settings screen.
  • Loading branch information
harshbhatt-23 committed Jul 4, 2023
1 parent f13eb21 commit a9c1a9d
Show file tree
Hide file tree
Showing 14 changed files with 1,484 additions and 1,348 deletions.
Binary file added assets/non-veg-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/veg-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/components/CustomComponents/SwitchWithText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from "react";
import { View, Text, StyleSheet } from "react-native";
import { Switch } from "react-native-paper";
import style from "./styles";

export default function SwitchWithText({}) {
return (
<>
<Text style={style.title}>{settingsLabel[language].measurements}</Text>
<View style={style.switch}>
<Text style={style.options.label}>
{isSwitchOnMeasurement
? settingsLabel[language].changeToUsImperial
: settingsLabel[language].changeToMetric}
</Text>
<Switch
value={isSwitchOnMeasurement}
onValueChange={onToggleSwitchMeasurement}
/>
</View>
</>
);
}
40 changes: 40 additions & 0 deletions src/components/CustomComponents/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { StyleSheet } from "react-native";

const styles = StyleSheet.create({
switch: {
flexDirection: "row",
justifyContent: "space-between",
marginTop: 10,
gap: 10,
title: {
fontSize: 23,
fontWeight: "bold",
},
marginBottom: 8,
},

title: {
marginTop: 8,
fontSize: 23,
fontWeight: "bold",
},
description: {
fontSize: 17,
color: "#777777",
marginBottom: 10,
},
options: {
container: {
alignItems: "center",
flexDirection: "row",
marginTop: 10,
justifyContent: "space-between",
},
label: {
marginRight: 10,
fontSize: 18,
},
},
});

export default styles;
2,324 changes: 1,145 additions & 1,179 deletions src/components/data/RecipeData.js

Large diffs are not rendered by default.

Loading

0 comments on commit a9c1a9d

Please sign in to comment.