1
- import React , { Component } from 'react' ;
1
+ import React , { Component } from 'react' ;
2
2
import './notification.css' ;
3
3
import Status from './statusicons/status' ;
4
- import { theme_color_panels , notify_status } from '../../globalvariables' ;
5
- import { FaExpand , FaBell , FaGithub , FaLinkedin , FaEnvelope , FaAt , FaStar } from 'react-icons/fa' ;
4
+ import { theme_color_panels , notify_status } from '../../globalvariables' ;
5
+ import { FaExpand , FaBell , FaGithub , FaLinkedin , FaEnvelope , FaAt , FaStar } from 'react-icons/fa' ;
6
6
7
- export default class Panel extends Component
8
- {
9
- constructor ( props )
10
- {
7
+ export default class Panel extends Component {
8
+ constructor ( props ) {
11
9
super ( props ) ;
12
- this . expand = this . expand . bind ( this ) ;
13
- this . state = { panelcolor :theme_color_panels , paneltype :'solid' } ;
10
+ this . expand = this . expand . bind ( this ) ;
11
+ this . state = { panelcolor : theme_color_panels , paneltype : 'solid' } ;
14
12
}
15
- expand ( )
16
- {
17
- this . props . parent_class . setState ( { isFull : true } ) ;
13
+
14
+ expand ( ) {
15
+ this . props . parent_class . setState ( { isFull : ! this . props . parent_class . state . isFull } )
18
16
}
19
- nullBind ( )
20
- {
17
+ nullBind ( ) {
21
18
22
19
}
23
- gitHubIcon = ( ) =>
24
- {
20
+ gitHubIcon = ( ) => {
25
21
window . open ( "https://github.com/RAJAGOPALAN-GANGADHARAN/" , "_blank" )
26
22
}
27
23
linkedin = ( ) => {
@@ -33,16 +29,15 @@ export default class Panel extends Component
33
29
repo = ( ) => {
34
30
window . open ( "https://github.com/RAJAGOPALAN-GANGADHARAN/JS-OS" , "_blank" ) ;
35
31
}
36
- render ( )
37
- {
38
- return (
39
- < div id = "notificationpanel" style = { { backgroundColor :this . state . panelcolor } } >
40
- < Status icon = { < FaExpand /> } event = { this . expand } styles = "expand_icon" />
32
+ render ( ) {
33
+ return (
34
+ < div id = "notificationpanel" style = { { backgroundColor : this . state . panelcolor } } >
35
+ < Status icon = { < FaExpand /> } event = { this . expand } styles = "expand_icon" />
41
36
{ notify_status ? ( < Status icon = { < FaBell /> } event = { this . nullBind } /> ) : ( < Status icon = { < FaBell /> } event = { this . nullBind } /> ) }
42
37
< Status icon = { < FaGithub /> } event = { this . gitHubIcon } />
43
38
< Status icon = { < FaLinkedin /> } event = { this . linkedin } />
44
39
< Status icon = { < FaAt /> } event = { this . mailto } />
45
- < Status icon = { < FaStar /> } event = { this . repo } />
40
+ < Status icon = { < FaStar /> } event = { this . repo } />
46
41
</ div >
47
42
)
48
43
}
0 commit comments