Skip to content

Commit

Permalink
feat: configure ReactionList reaction theme (#2561)
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 authored Jun 19, 2024
1 parent af68328 commit e89fa89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ const ReactionListWithContext = <
middleIcon,
radius: themeRadius,
reactionBubble,
reactionContainer,
reactionCount,
reactionSize: themeReactionSize,
strokeSize: themeStrokeSize,
},
Expand Down Expand Up @@ -246,6 +248,7 @@ const ReactionListWithContext = <
{
marginRight: index < reactions.length - 1 ? 5 : 0,
},
reactionContainer,
]}
>
<Icon
Expand All @@ -256,7 +259,9 @@ const ReactionListWithContext = <
supportedReactions={supportedReactions}
type={reaction.type}
/>
<Text style={[styles.reactionCount, { color: black }]}>{reaction.count}</Text>
<Text style={[styles.reactionCount, { color: black }, reactionCount]}>
{reaction.count}
</Text>
</View>
))}
</TouchableOpacity>
Expand Down
4 changes: 4 additions & 0 deletions package/src/contexts/themeContext/utils/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ export type Theme = {
middleIcon: ViewStyle;
radius: number;
reactionBubble: ViewStyle;
reactionContainer: ViewStyle;
reactionCount: TextStyle;
reactionSize: number;
strokeSize: number;
};
Expand Down Expand Up @@ -1119,6 +1121,8 @@ export const defaultTheme: Theme = {
middleIcon: {},
radius: 2, // not recommended to change this
reactionBubble: {},
reactionContainer: {},
reactionCount: {},
reactionSize: 24,
strokeSize: 1, // not recommended to change this
},
Expand Down

0 comments on commit e89fa89

Please sign in to comment.