Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
mattermost-webapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
sysadmin
mattermost
mattermost-webapp
Commits
5d381fef
Commit
5d381fef
authored
Dec 12, 2018
by
Joram Wilander
Committed by
JoramWilander
Dec 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix announcement banner overlapping (#2186)
parent
fbb89236
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
components/announcement_bar/announcement_bar.jsx
components/announcement_bar/announcement_bar.jsx
+18
-0
No files found.
components/announcement_bar/announcement_bar.jsx
View file @
5d381fef
...
...
@@ -24,6 +24,24 @@ export default class AnnouncementBar extends React.PureComponent {
handleClose
:
null
,
}
componentDidMount
()
{
this
.
setBodyClass
(
!
this
.
props
.
showCloseButton
);
}
componentDidUpdate
(
prevProps
)
{
if
(
this
.
props
.
showCloseButton
!==
prevProps
.
showCloseButton
)
{
this
.
setBodyClass
(
!
this
.
props
.
showCloseButton
);
}
}
setBodyClass
=
(
fixed
)
=>
{
if
(
fixed
)
{
document
.
body
.
classList
.
add
(
'
announcement-bar--fixed
'
);
}
else
{
document
.
body
.
classList
.
remove
(
'
announcement-bar--fixed
'
);
}
}
handleClose
=
(
e
)
=>
{
e
.
preventDefault
();
if
(
this
.
props
.
handleClose
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment