Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit 1d74e8c

Browse files
committed
feat: use feather icons
1 parent 5940f92 commit 1d74e8c

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

src/Chat/Twilio/ChannelView.tsx

+17-16
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
OtherChannelHeader,
2727
} from '../components/ChannelView'
2828
import { UserDescriptor } from 'twilio-chat/lib/userdescriptor'
29+
import { XSquare, Maximize2, Minimize2 } from 'react-feather'
2930

3031
type AuthorMap = { [key: string]: User }
3132
type AuthorNicks = { [key: string]: string | undefined }
@@ -360,7 +361,7 @@ export const ChannelView = ({
360361
onCloseChannel(otherChannel)
361362
}}
362363
>
363-
X
364+
<XSquare />
364365
</MinimizeButton>
365366
</OtherChannelHeader>
366367
))}
@@ -372,26 +373,13 @@ export const ChannelView = ({
372373
Chat: <strong>#{selectedChannel}</strong>
373374
</Title>
374375
<span>
375-
{joinedChannels.length > 1 && (
376-
<MinimizeButton
377-
onClick={e => {
378-
e.stopPropagation()
379-
onSwitchChannel(
380-
joinedChannels.find(c => c !== selectedChannel) as string,
381-
)
382-
onCloseChannel(selectedChannel)
383-
}}
384-
>
385-
X
386-
</MinimizeButton>
387-
)}
388376
{!isMinimized && (
389377
<MinimizeButton
390378
onClick={() => {
391379
memoMinimized(true)
392380
}}
393381
>
394-
_
382+
<Minimize2 />
395383
</MinimizeButton>
396384
)}
397385
{isMinimized && (
@@ -400,7 +388,20 @@ export const ChannelView = ({
400388
memoMinimized(false)
401389
}}
402390
>
403-
+
391+
<Maximize2 />
392+
</MinimizeButton>
393+
)}
394+
{joinedChannels.length > 1 && (
395+
<MinimizeButton
396+
onClick={e => {
397+
e.stopPropagation()
398+
onSwitchChannel(
399+
joinedChannels.find(c => c !== selectedChannel) as string,
400+
)
401+
onCloseChannel(selectedChannel)
402+
}}
403+
>
404+
<XSquare />
404405
</MinimizeButton>
405406
)}
406407
</span>

src/Chat/components/ChannelView.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@ export const Button = styled.button`
4444
margin: 0.5rem;
4545
`
4646

47-
export const MinimizeButton = styled(Button)`
47+
export const MinimizeButton = styled.button`
4848
width: 30px;
49-
border-color: #fff;
49+
height: 30px;
50+
border: 0;
51+
padding: 0;
5052
${Header} & {
5153
color: inherit;
5254
}
55+
background-color: transparent;
5356
cursor: pointer;
5457
`
5558

0 commit comments

Comments
 (0)