-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(articles): ajout filtre favoris (#1430)
- Loading branch information
Showing
13 changed files
with
461 additions
and
127 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
front/src/components/article/articlesFilterFavoritesRow.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from "react"; | ||
import { StyleSheet, View } from "react-native"; | ||
|
||
import { Labels } from "../../constants"; | ||
import { Colors, FontWeight, Margins, Paddings, Sizes } from "../../styles"; | ||
import { SecondaryText, Toggle } from "../baseComponents"; | ||
|
||
interface Props { | ||
isToggleOn: boolean; | ||
onToggleFavorite: () => void; | ||
} | ||
|
||
const ArticlesFilterFavoritesRow: React.FC<Props> = ({ | ||
isToggleOn, | ||
onToggleFavorite, | ||
}) => { | ||
return ( | ||
<View style={styles.mainContainer}> | ||
<SecondaryText | ||
style={{ | ||
color: Colors.primaryBlueDark, | ||
fontSize: Sizes.xs, | ||
fontWeight: isToggleOn ? FontWeight.bold : FontWeight.normal, | ||
}} | ||
> | ||
{Labels.articleList.filterByFavorites} | ||
</SecondaryText> | ||
<Toggle isToggleOn={isToggleOn} toggleSwitch={onToggleFavorite} /> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
mainContainer: { | ||
alignItems: "center", | ||
flexDirection: "row", | ||
justifyContent: "space-between", | ||
margin: Margins.default, | ||
marginEnd: 0, | ||
padding: Paddings.default, | ||
paddingTop: 0, | ||
}, | ||
rowTitleStyle: { | ||
color: Colors.primaryBlueDark, | ||
fontSize: Sizes.xs, | ||
}, | ||
}); | ||
|
||
export default ArticlesFilterFavoritesRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import IcomoonFont from "../../assets/icomoon/icomoon.ttf"; | ||
import CheckboxCheckedIcon from "../../assets/images/checkbox_checked.svg"; | ||
import CheckboxUncheckedIcon from "../../assets/images/checkbox_unchecked.svg"; | ||
import LogoMinistere from "../../assets/images/Logo ministere.svg"; | ||
import AppLogo from "../../assets/images/logo.svg"; | ||
import CheckedIcon from "../../assets/images/radio_checked.svg"; | ||
import UncheckedIcon from "../../assets/images/radio_unchecked.svg"; | ||
|
||
export { AppLogo, CheckedIcon, IcomoonFont, LogoMinistere, UncheckedIcon }; | ||
export { | ||
AppLogo, | ||
CheckboxCheckedIcon, | ||
CheckboxUncheckedIcon, | ||
CheckedIcon, | ||
IcomoonFont, | ||
LogoMinistere, | ||
UncheckedIcon, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import useAccessibilityReader from "./useAccessibilityReader"; | ||
import useCachedResources from "./useCachedResources"; | ||
import useColorScheme from "./useColorScheme"; | ||
import useFavoriteArticlesIds from "./useFavoriteArticlesIds"; | ||
import useSavedCartographyFilters from "./useSavedCartographyFilters"; | ||
|
||
export { | ||
useAccessibilityReader, | ||
useCachedResources, | ||
useColorScheme, | ||
useFavoriteArticlesIds, | ||
useSavedCartographyFilters, | ||
}; |
Oops, something went wrong.