BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6c97107d
Unverified
Commit
6c97107d
authored
Oct 04, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed eslint
parent
bbf7ea24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
flash.js
app/assets/javascripts/flash.js
+8
-8
flash_spec.js
spec/javascripts/flash_spec.js
+2
-3
No files found.
app/assets/javascripts/flash.js
View file @
6c97107d
...
...
@@ -44,14 +44,14 @@ const createFlashEl = (message, type) => `
* along with ability to provide actionConfig which can be used to show
* additional action or link on banner next to message
*
* @param {String} message
Flash message text
* @param {String} type
Type of Flash, it can be `notice` or `alert` (default)
* @param {Object} parent
Reference to parent element under which Flash needs to appear
* @param {Object} actonConfig
Map of config to show action on banner
* @param {String} href
URL to which action config should point to (default: '#')
* @param {String} title
Title of action
* @param {Function} clickHandler
Method to call when action is clicked on
* @param {Boolean} fadeTransition
Boolean to determine whether to fade the alert out
* @param {String} message Flash message text
* @param {String} type Type of Flash, it can be `notice` or `alert` (default)
* @param {Object} parent Reference to parent element under which Flash needs to appear
* @param {Object} actonConfig Map of config to show action on banner
* @param {String} href URL to which action config should point to (default: '#')
* @param {String} title Title of action
* @param {Function} clickHandler Method to call when action is clicked on
* @param {Boolean} fadeTransition Boolean to determine whether to fade the alert out
*/
const
createFlash
=
function
createFlash
(
message
,
...
...
spec/javascripts/flash_spec.js
View file @
6c97107d
...
...
@@ -135,7 +135,6 @@ describe('Flash', () => {
describe
(
'createFlash'
,
()
=>
{
describe
(
'no flash-container'
,
()
=>
{
it
(
'does not add to the DOM'
,
()
=>
{
const
el
=
flash
(
'test'
);
const
flashEl
=
flash
(
'testing'
);
expect
(
...
...
@@ -185,7 +184,7 @@ describe('Flash', () => {
expect
(
document
.
querySelector
(
'.flash-text'
).
className
,
).
toBe
(
'flash-text container-fluid container-limited'
)
).
toBe
(
'flash-text container-fluid container-limited'
)
;
});
it
(
'does not add container when outside of content-wrapper'
,
()
=>
{
...
...
@@ -194,7 +193,7 @@ describe('Flash', () => {
expect
(
document
.
querySelector
(
'.flash-text'
).
className
,
).
toBe
(
'flash-text'
)
).
toBe
(
'flash-text'
)
;
});
it
(
'removes element after clicking'
,
()
=>
{
...
...
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