-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathActionBubbles.js
67 lines (61 loc) · 1.68 KB
/
ActionBubbles.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import React from 'react';
import { COLOR_BLACK } from './constants';
import { iconRefresh } from './images';
export default function ActionBubbles({
// eslint-disable-next-line react/prop-types
showChangeVariableColor,
// eslint-disable-next-line react/prop-types
onChangeVariableColor,
}) {
return (
<>
<div className="actionbubbles">
{showChangeVariableColor && (
<div
className="actionbubbles-button"
onClick={onChangeVariableColor}
onKeyDown={() => {}}
role="button"
tabIndex={0}
>
<img src={iconRefresh(COLOR_BLACK)} alt="Action" />
</div>
)}
</div>
<style jsx="true">
{`
.actionbubbles {
align-items: center;
background-color: rgba(25, 50, 75, 0.5);
background-color: transparent;
bottom: 20px;
display: flex;
position: fixed;
right: 20px;
z-index: 1;
}
.actionbubbles-button {
align-items: center;
background-color: #ffffff;
border-radius: 50%;
border: 1px solid #d3d3d3;
box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1),
0 0 0 1px rgba(10, 10, 10, 0.02);
cursor: pointer;
display: flex;
height: 40px;
justify-content: center;
width: 40px;
}
.actionbubbles-button:hover {
background-color: #fafafa;
}
.actionbubbles-button img {
height: 15px;
width: 15px;
}
`}
</style>
</>
);
}