Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
public
Mímir
Commits
9ec364b8
Commit
9ec364b8
authored
Aug 13, 2020
by
Aron Fiechter
Browse files
Add button to clear entity in Entity/Info
parent
21b7d91d
Pipeline
#879
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/src/components/voronoi/entity/Info.js
View file @
9ec364b8
...
@@ -4,10 +4,15 @@ import Card from 'react-bootstrap/Card';
...
@@ -4,10 +4,15 @@ import Card from 'react-bootstrap/Card';
import
ListGroup
from
'
react-bootstrap/ListGroup
'
;
import
ListGroup
from
'
react-bootstrap/ListGroup
'
;
import
Button
from
'
react-bootstrap/Button
'
;
import
Button
from
'
react-bootstrap/Button
'
;
import
ReadMore
from
'
./ReadMore
'
;
import
ReadMore
from
'
./ReadMore
'
;
import
{
MdClose
}
from
'
react-icons/md
'
;
import
{
useDispatch
}
from
'
react-redux
'
;
import
{
clearEntity
}
from
'
../voronoiSlice
'
;
export
default
function
Info
(
props
)
{
export
default
function
Info
(
props
)
{
const
{
node
}
=
props
;
const
{
node
}
=
props
;
const
dispatch
=
useDispatch
();
return
(
return
(
<
Card
style
=
{{
width
:
'
100%
'
}}
>
<
Card
style
=
{{
width
:
'
100%
'
}}
>
{
node
.
hasImage
&&
(
{
node
.
hasImage
&&
(
...
@@ -46,6 +51,11 @@ export default function Info(props) {
...
@@ -46,6 +51,11 @@ export default function Info(props) {
Open
in
the
Archive
Open
in
the
Archive
<
/Button
>
<
/Button
>
<
/Card.Footer
>
<
/Card.Footer
>
<
div
className
=
"
position-absolute w-100 p-sm-2
"
>
<
a
href
=
"
#
"
className
=
"
float-right ml-sm-2
"
onClick
=
{()
=>
dispatch
(
clearEntity
())}
>
<
MdClose
/>
<
/a
>
<
/div
>
<
/Card
>
<
/Card
>
);
);
}
}
Write
Preview
Supports
Markdown
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