Skip to content

Commit e63d748

Browse files
authored
fix: refactor icons in the SDK (#3445)
1 parent cdfdd36 commit e63d748

File tree

12 files changed

+10
-141
lines changed

12 files changed

+10
-141
lines changed

package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ import { StyleSheet, View } from 'react-native';
44
import { CommandVariants } from 'stream-chat';
55

66
import { useTheme } from '../../contexts/themeContext/ThemeContext';
7-
import { Flag, GiphyIcon, Lightning, Mute, Sound, UserAdd, UserDelete } from '../../icons';
7+
import { Flag, GiphyIcon, Mute, Sound, UserAdd, UserDelete } from '../../icons';
88
import { Imgur } from '../../icons/Imgur';
9+
import { Lightning } from '../../icons/Lightning';
910

1011
export const SuggestionCommandIcon = ({ name }: { name: CommandVariants }) => {
1112
const {
12-
theme: {
13-
semantics,
14-
colors: { white },
15-
},
13+
theme: { semantics },
1614
} = useTheme();
1715

1816
if (name === 'ban') {
@@ -30,7 +28,7 @@ export const SuggestionCommandIcon = ({ name }: { name: CommandVariants }) => {
3028
} else if (name === 'unmute') {
3129
return <Sound height={20} stroke={semantics.textSecondary} width={20} />;
3230
} else {
33-
return <Lightning fill={white} size={16} />;
31+
return <Lightning fill={semantics.textSecondary} height={16} width={16} />;
3432
}
3533
};
3634

package/src/components/ui/GiphyChip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useMessageComposer } from '../../contexts/messageInputContext/hooks/use
77
import { useTheme } from '../../contexts/themeContext/ThemeContext';
88
import { useStateStore } from '../../hooks/useStateStore';
99
import { Cross } from '../../icons/Cross';
10-
import { NewLightning } from '../../icons/NewLightning';
10+
import { Lightning } from '../../icons/Lightning';
1111
import { primitives } from '../../theme';
1212

1313
const textComposerStateSelector = (state: TextComposerState) => ({
@@ -32,7 +32,7 @@ export const GiphyChip = () => {
3232

3333
return (
3434
<View style={styles.container}>
35-
<NewLightning fill={semantics.textInverse} height={16} width={16} />
35+
<Lightning fill={semantics.textInverse} height={16} width={16} />
3636
<Text style={styles.text}>{commandName}</Text>
3737
<Pressable onPress={onPressHandler}>
3838
<Cross stroke={semantics.textInverse} height={16} width={16} />

package/src/icons/Archive.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

package/src/icons/ChatIcon.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

package/src/icons/DownloadCloud.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

package/src/icons/Error.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

package/src/icons/Lightning.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import React from 'react';
22

3-
import Svg, { Path } from 'react-native-svg';
3+
import { Path, Svg } from 'react-native-svg';
44

55
import { IconProps } from './utils/base';
66

7-
type Props = IconProps & {
8-
size: number;
9-
};
10-
11-
export const Lightning = ({ size = 32, ...rest }: Props) => (
12-
<Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
7+
export const Lightning = ({ height, width, ...rest }: IconProps) => (
8+
<Svg fill={'none'} height={height} viewBox={'0 0 12 12'} width={width} {...rest}>
139
<Path
14-
d='M14.8522 28H13.5188L14.8522 18.6667H10.1855C9.01218 18.6667 9.74551 17.6667 9.77218 17.6267C11.4922 14.5867 14.0788 10.0533 17.5322 4H18.8655L17.5322 13.3333H22.2122C22.7455 13.3333 23.0388 13.5867 22.7455 14.2133C17.4788 23.4 14.8522 28 14.8522 28Z'
10+
d='M8.2266 1.16648C8.524 0.279984 7.4007 -0.417073 6.7514 0.291481L1.73231 5.76855C1.21953 6.32815 1.60932 7.24205 2.37725 7.24205H4.79225C4.87431 7.24205 4.93956 7.3243 4.91215 7.41115L3.82717 10.8489C3.54697 11.7367 4.67246 12.4136 5.3123 11.7034L10.2732 6.1964C10.7789 5.6351 10.3876 4.72846 9.6232 4.72846H7.20825C7.1253 4.72846 7.0598 4.64444 7.0891 4.5571L8.2266 1.16648Z'
1511
{...rest}
1612
/>
1713
</Svg>

package/src/icons/MessageBubble.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

package/src/icons/NewLightning.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

package/src/icons/SendPoll.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)