Skip to content

Commit

Permalink
feat: apply theme to SendButton internal icons
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Oct 31, 2023
1 parent 2bb0094 commit daf6ae6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package/src/components/MessageInput/SendButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SendButtonWithContext = <
const {
theme: {
colors: { accent_blue, grey_gainsboro },
messageInput: { sendButton },
messageInput: { searchIcon, sendButton, sendRightIcon, sendUpIcon },
},
} = useTheme();

Expand All @@ -39,9 +39,9 @@ const SendButtonWithContext = <
style={[sendButton]}
testID='send-button'
>
{giphyActive && <Search pathFill={disabled ? grey_gainsboro : accent_blue} />}
{!giphyActive && disabled && <SendRight pathFill={grey_gainsboro} />}
{!giphyActive && !disabled && <SendUp pathFill={accent_blue} />}
{giphyActive && <Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />}
{!giphyActive && disabled && <SendRight pathFill={grey_gainsboro} {...sendUpIcon} />}
{!giphyActive && !disabled && <SendUp pathFill={accent_blue} {...sendRightIcon} />}
</Pressable>
);
};
Expand Down
6 changes: 6 additions & 0 deletions package/src/contexts/themeContext/utils/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,15 @@ export type Theme = {
moreOptionsButton: ViewStyle;
optionsContainer: ViewStyle;
replyContainer: ViewStyle;
searchIcon: IconProps;
sendButton: ViewStyle;
sendButtonContainer: ViewStyle;
sendMessageDisallowedIndicator: {
container: ViewStyle;
text: TextStyle;
};
sendRightIcon: IconProps;
sendUpIcon: IconProps;
showThreadMessageInChannelButton: {
check: IconProps;
checkBoxActive: ViewStyle;
Expand Down Expand Up @@ -782,12 +785,15 @@ export const defaultTheme: Theme = {
moreOptionsButton: {},
optionsContainer: {},
replyContainer: {},
searchIcon: {},
sendButton: {},
sendButtonContainer: {},
sendMessageDisallowedIndicator: {
container: {},
text: {},
},
sendRightIcon: {},
sendUpIcon: {},
showThreadMessageInChannelButton: {
check: {},
checkBoxActive: {},
Expand Down

0 comments on commit daf6ae6

Please sign in to comment.