Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3155: Replace register text with svg in 'HeaderMenu' #3158

Merged
merged 10 commits into from
Dec 19, 2017
Prev Previous commit
Next Next commit
#3155: replace 'Icon' with 'Image' mouse event suffix
  • Loading branch information
jeff1evesque committed Dec 19, 2017
commit 180f6d889d13ff5b6a089685fd3e03d100556103
12 changes: 6 additions & 6 deletions src/jsx/import/svg/svg-books.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ class SvgBooks extends Component {
inner_color: colors['gray-5'],
outer_color: colors['gray-6'],
}
this.mouseOverIcon = this.mouseOverIcon.bind(this);
this.mouseOutIcon = this.mouseOutIcon.bind(this);
this.mouseOverImage = this.mouseOverImage.bind(this);
this.mouseOutImage = this.mouseOutImage.bind(this);
}
// callback for mouseOver svg
mouseOverIcon(event) {
mouseOverImage(event) {
this.setState({ outer_color: colors['green-3'] });
}
// callback for mouseOut svg
mouseOutIcon(event) {
mouseOutImage(event) {
this.setState({ outer_color: colors['gray-6'] });
}
// triggered when 'state properties' change
Expand All @@ -38,8 +38,8 @@ class SvgBooks extends Component {
height='45px'
viewBox='0 0 225 225'
preserveAspectRatio='xMidYMid meet'
onMouseOver={this.mouseOverIcon}
onMouseOut={this.mouseOutIcon}
onMouseOver={this.mouseOverImage}
onMouseOut={this.mouseOutImage}
>
<g
transform='translate(20, 280) scale(0.1, -0.1)'
Expand Down
12 changes: 6 additions & 6 deletions src/jsx/import/svg/svg-home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ class SvgHome extends Component {
roof_color: colors['gray-5'],
house_color: colors['gray-6'],
}
this.mouseOverIcon = this.mouseOverIcon.bind(this);
this.mouseOutIcon = this.mouseOutIcon.bind(this);
this.mouseOverImage = this.mouseOverImage.bind(this);
this.mouseOutImage = this.mouseOutImage.bind(this);
}
// callback for mouseOver svg
mouseOverIcon(event) {
mouseOverImage(event) {
this.setState({ roof_color: colors['green-3'] });
}
// callback for mouseOut svg
mouseOutIcon(event) {
mouseOutImage(event) {
this.setState({ roof_color: colors['gray-5'] });
}
// triggered when 'state properties' change
Expand All @@ -47,8 +47,8 @@ class SvgHome extends Component {
height='45px'
viewBox='0 0 626.000000 626.000000'
preserveAspectRatio='xMidYMid meet'
onMouseOver={this.mouseOverIcon}
onMouseOut={this.mouseOutIcon}
onMouseOver={this.mouseOverImage}
onMouseOut={this.mouseOutImage}
>
<g
transform={`
Expand Down
12 changes: 6 additions & 6 deletions src/jsx/import/svg/svg-pencil-note.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class SvgPencilNote extends Component {
inner_color: colors['gray-5'],
outer_color: colors['gray-6'],
}
this.mouseOverIcon = this.mouseOverIcon.bind(this);
this.mouseOutIcon = this.mouseOutIcon.bind(this);
this.mouseOverImage = this.mouseOverImage.bind(this);
this.mouseOutImage = this.mouseOutImage.bind(this);
}
// callback for mouseOver svg
mouseOverIcon(event) {
mouseOverImage(event) {
this.setState({ inner_color: colors['green-3'] });
}
// callback for mouseOut svg
mouseOutIcon(event) {
mouseOutImage(event) {
this.setState({ inner_color: colors['gray-5'] });
}
// triggered when 'state properties' change
Expand All @@ -43,8 +43,8 @@ class SvgPencilNote extends Component {
viewBox='0 0 512 512'
enableBackground='new 0 0 45 45'
preserveAspectRatio='xMidYMid meet'
onMouseOver={this.mouseOverIcon}
onMouseOut={this.mouseOutIcon}
onMouseOver={this.mouseOverImage}
onMouseOut={this.mouseOutImage}
>
<g>
<path
Expand Down
12 changes: 6 additions & 6 deletions src/jsx/import/svg/svg-user.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ class SvgUser extends Component {
body_color: colors['gray-5'],
head_color: colors['gray-6'],
}
this.mouseOverIcon = this.mouseOverIcon.bind(this);
this.mouseOutIcon = this.mouseOutIcon.bind(this);
this.mouseOverImage = this.mouseOverImage.bind(this);
this.mouseOutImage = this.mouseOutImage.bind(this);
}
// callback for mouseOver svg
mouseOverIcon(event) {
mouseOverImage(event) {
this.setState({ body_color: colors['green-3'] });
}
// callback for mouseOut svg
mouseOutIcon(event) {
mouseOutImage(event) {
this.setState({ body_color: colors['gray-5'] });
}
// triggered when 'state properties' change
Expand All @@ -42,8 +42,8 @@ class SvgUser extends Component {
viewBox='0 0 512 512'
enableBackground='new 0 0 45 45'
preserveAspectRatio='xMidYMid meet'
onMouseOver={this.mouseOverIcon}
onMouseOut={this.mouseOutIcon}
onMouseOver={this.mouseOverImage}
onMouseOut={this.mouseOutImage}
>
<g>
<circle
Expand Down