This repository was archived by the owner on Sep 7, 2020. It is now read-only.
File tree 2 files changed +18
-22
lines changed
2 files changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import {
26
26
OtherChannelHeader ,
27
27
} from '../components/ChannelView'
28
28
import { UserDescriptor } from 'twilio-chat/lib/userdescriptor'
29
- import { XSquare , Maximize2 , Minimize2 } from 'react-feather'
30
29
31
30
type AuthorMap = { [ key : string ] : User }
32
31
type AuthorNicks = { [ key : string ] : string | undefined }
@@ -361,7 +360,7 @@ export const ChannelView = ({
361
360
onCloseChannel ( otherChannel )
362
361
} }
363
362
>
364
- < XSquare />
363
+ X
365
364
</ MinimizeButton >
366
365
</ OtherChannelHeader >
367
366
) ) }
@@ -373,35 +372,35 @@ export const ChannelView = ({
373
372
Chat: < strong > #{ selectedChannel } </ strong >
374
373
</ Title >
375
374
< span >
376
- { ! isMinimized && (
375
+ { joinedChannels . length > 1 && (
377
376
< MinimizeButton
378
- onClick = { ( ) => {
379
- memoMinimized ( true )
377
+ onClick = { e => {
378
+ e . stopPropagation ( )
379
+ onSwitchChannel (
380
+ joinedChannels . find ( c => c !== selectedChannel ) as string ,
381
+ )
382
+ onCloseChannel ( selectedChannel )
380
383
} }
381
384
>
382
- < Minimize2 />
385
+ X
383
386
</ MinimizeButton >
384
387
) }
385
- { isMinimized && (
388
+ { ! isMinimized && (
386
389
< MinimizeButton
387
390
onClick = { ( ) => {
388
- memoMinimized ( false )
391
+ memoMinimized ( true )
389
392
} }
390
393
>
391
- < Maximize2 />
394
+ _
392
395
</ MinimizeButton >
393
396
) }
394
- { joinedChannels . length > 1 && (
397
+ { isMinimized && (
395
398
< MinimizeButton
396
- onClick = { e => {
397
- e . stopPropagation ( )
398
- onSwitchChannel (
399
- joinedChannels . find ( c => c !== selectedChannel ) as string ,
400
- )
401
- onCloseChannel ( selectedChannel )
399
+ onClick = { ( ) => {
400
+ memoMinimized ( false )
402
401
} }
403
402
>
404
- < XSquare />
403
+ +
405
404
</ MinimizeButton >
406
405
) }
407
406
</ span >
Original file line number Diff line number Diff line change @@ -44,15 +44,12 @@ export const Button = styled.button`
44
44
margin: 0.5rem;
45
45
`
46
46
47
- export const MinimizeButton = styled . button `
47
+ export const MinimizeButton = styled ( Button ) `
48
48
width: 30px;
49
- height: 30px;
50
- border: 0;
51
- padding: 0;
49
+ border-color: #fff;
52
50
${ Header } & {
53
51
color: inherit;
54
52
}
55
- background-color: transparent;
56
53
cursor: pointer;
57
54
`
58
55
You can’t perform that action at this time.
0 commit comments