Skip to content

Commit fd5d889

Browse files
authored
show hover icon when compose text icon is hovered (#601)
* add hover icon when compose text icon is hovered * remove unused codes
1 parent 153a1d9 commit fd5d889

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed
Lines changed: 8 additions & 0 deletions
Loading

src/components/MessagesPanel/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import NavigationBar from '../NavigationBar';
1010
import SearchInput from '../SearchInput';
1111
import ComposeText from '../../assets/images/ComposeText.svg';
1212
import NewComposeText from '../../assets/images/NewComposeText.svg';
13+
import NewComposeTextHover from '../../assets/images/NewComposeTextHover.svg';
1314
import styles from './styles.scss';
1415
import i18n from './i18n';
1516

@@ -32,6 +33,7 @@ TabTitle.propTypes = {
3233
export default class MessagesPanel extends Component {
3334
constructor(props) {
3435
super(props);
36+
3537
this.onTabChanged = (type) => {
3638
if (typeof this.props.updateTypeFilter === 'function') {
3739
this.props.updateTypeFilter(type);
@@ -132,7 +134,8 @@ export default class MessagesPanel extends Component {
132134
className={styles.textIcon}
133135
onClick={goToComposeText}
134136
>
135-
<NewComposeText width={20} height={21} />
137+
<NewComposeTextHover className={styles.hoverTextSVGIcon} width={20} height={21} />
138+
<NewComposeText className={styles.textSVGIcon} width={20} height={21} />
136139
</span>
137140
</div>
138141
) :

src/components/MessagesPanel/styles.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ $tabBar-height: 35px;
6464
path {
6565
fill: $primary-color;
6666
}
67+
68+
.hoverTextSVGIcon {
69+
display: none;
70+
}
71+
72+
.textSVGIcon {
73+
display: block;
74+
}
75+
76+
&:hover {
77+
.hoverTextSVGIcon {
78+
display: block;
79+
}
80+
81+
.textSVGIcon {
82+
display: none;
83+
}
84+
}
6785
}
6886

6987
.withoutTextIcon {

0 commit comments

Comments
 (0)