@@ -4,35 +4,30 @@ import { HoverEffect } from '~/common/styleguide';
44import { Bookmark , BookmarkFilled } from '~/components/Icons' ;
55import Tooltip from '~/components/Tooltip' ;
66import { useBookmarks } from '~/context/BookmarksContext' ;
7+ import tw from '~/util/tailwind' ;
78
89type BookmarkButtonProps = {
910 bookmarkId : string ;
1011 style ?: StyleProp < ViewStyle > ;
1112 iconStyle ?: StyleProp < ViewStyle > ;
12- filledIconStyle ?: StyleProp < ViewStyle > ;
1313} ;
1414
15- export default function BookmarkButton ( {
16- bookmarkId,
17- style,
18- iconStyle,
19- filledIconStyle,
20- } : BookmarkButtonProps ) {
21- const { isBookmarked : checkIsBookmarked , toggleBookmark : toggleBookmarkGlobal } = useBookmarks ( ) ;
15+ export default function BookmarkButton ( { bookmarkId, style, iconStyle } : BookmarkButtonProps ) {
16+ const { checkIsBookmarked, toggleBookmark } = useBookmarks ( ) ;
2217 const isBookmarked = checkIsBookmarked ( bookmarkId ) ;
2318
2419 function handleToggleBookmark ( ) {
25- toggleBookmarkGlobal ( bookmarkId ) ;
20+ toggleBookmark ( bookmarkId ) ;
2621 }
2722
2823 return (
2924 < Tooltip
3025 trigger = {
3126 < HoverEffect onPress = { handleToggleBookmark } style = { style } >
3227 { isBookmarked ? (
33- < BookmarkFilled style = { filledIconStyle ?? iconStyle } />
28+ < BookmarkFilled style = { [ tw `size-4 text-primary-dark dark:text-primary` , iconStyle ] } />
3429 ) : (
35- < Bookmark style = { iconStyle } />
30+ < Bookmark style = { [ tw `size-4 text-palette-gray5 dark:text-palette-gray4` , iconStyle ] } />
3631 ) }
3732 </ HoverEffect >
3833 } >
0 commit comments