Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Réouven ASSOULY
zesje
Commits
19540f4c
Commit
19540f4c
authored
Mar 19, 2018
by
Thomas Roos
Browse files
Non working notification thingy
parent
2068e84a
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/components/Noti.jsx
0 → 100644
View file @
19540f4c
import
React
from
'
react
'
;
class
Noti
extends
React
.
Component
{
state
=
{
messages
:
[
{
title
:
'
Errorrrrrr!
'
,
content
:
'
Omg li la
'
,
type
:
'
danger
'
,
duration
:
10
,
closable
:
true
,
small
:
true
}
]
}
new
=
(
message
,
options
)
=>
{
console
.
log
(
message
);
}
render
()
{
return
(
<
div
>
{
this
.
state
.
messages
.
map
((
message
,
index
)
=>
<
div
className
=
{
"
notification is-
"
+
message
.
type
}
key
=
{
index
}
>
<
p
className
=
"title"
>
{
message
.
title
}
</
p
>
{
message
.
closable
?
<
button
className
=
"delete"
></
button
>
:
null
}
{
message
.
content
}
</
div
>
)
}
</
div
>
)
}
}
export
default
Noti
;
client/views/Grade.js
View file @
19540f4c
...
...
@@ -3,21 +3,44 @@ import NavBar from '../components/NavBar';
import
Hero
from
'
../components/Hero
'
;
import
Footer
from
'
../components/Footer
'
;
const
Grade
=
()
=>
{
return
(
<
div
>
import
Noti
from
'
../components/Noti.jsx
'
<
NavBar
/>
class
Grade
extends
React
.
Component
{
<
Hero
title
=
'
Grade
'
subtitle
=
'
This is where the magic happens!
'
/>
<
h1
>
React
Router
demo
<
/h1
>
Hoi
dit
de
Grade
<
Footer
/>
click
=
()
=>
{
this
.
Noti
.
new
(
'
Heeeej dit werkt
'
);
}
<
/div
>
)
render
()
{
return
(
<
div
>
<
NavBar
/>
<
Hero
title
=
'
Grade
'
subtitle
=
'
This is where the magic happens!
'
/>
<
section
className
=
"
section
"
>
<
div
className
=
"
container
"
>
<
h1
>
React
Router
demo
<
/h1
>
Hoi
dit
de
Grade
<
Noti
ref
=
{(
noti
)
=>
{
this
.
Noti
=
noti
;
}}
/
>
<
button
className
=
"
button
"
onClick
=
{
this
.
click
}
>
Hii
<
/button
>
<
/div
>
<
/section
>
<
Footer
/>
<
/div
>
)
}
}
export
default
Grade
;
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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