-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43622 from tienifr/fix/42673
fix: badge is not crossed out when deleted offline
- Loading branch information
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
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,21 @@ | ||
import React, {useMemo} from 'react'; | ||
import type {StyleProp, TextStyle, ViewStyle} from 'react-native'; | ||
|
||
type CustomStylesForChildrenContextType = StyleProp<ViewStyle & TextStyle> | null; | ||
|
||
const CustomStylesForChildrenContext = React.createContext<CustomStylesForChildrenContextType>(null); | ||
|
||
type CustomStylesForChildrenProviderProps = React.PropsWithChildren & { | ||
style: StyleProp<ViewStyle & TextStyle> | null; | ||
}; | ||
|
||
function CustomStylesForChildrenProvider({children, style}: CustomStylesForChildrenProviderProps) { | ||
const value = useMemo(() => style, [style]); | ||
|
||
return <CustomStylesForChildrenContext.Provider value={value}>{children}</CustomStylesForChildrenContext.Provider>; | ||
} | ||
|
||
CustomStylesForChildrenProvider.displayName = 'CustomStylesForChildrenProvider'; | ||
|
||
export default CustomStylesForChildrenProvider; | ||
export {CustomStylesForChildrenContext}; |
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