Skip to content

Commit 62dfd1d

Browse files
authored
Merge pull request #95 from tubacatal/dev
edit event loop component with two arrows instead of one
2 parents 4f0923b + 94ae3f1 commit 62dfd1d

2 files changed

Lines changed: 33 additions & 7 deletions

File tree

src/components/EventLoop/EventLoop.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import { addFunctionToCallstack } from '../../redux/callstack/callstack.actions'
77
import { toggleSpin } from '../../redux/eventLoop/eventLoop.actions'
88

99
class EventLoop extends Component {
10-
1110
render() {
1211
return (
1312
<div className={'spinner-container' + (this.props.spinArrow ? ' spin' : '')}>
14-
<div className="circle" />
15-
<div className="triangle" />
13+
<div className="half-circle-right" />
14+
<div className="triangle-right" />
15+
<div className="half-circle-left" />
16+
<div className="triangle-left" />
1617
</div>
1718
)
1819
}

src/components/EventLoop/EventLoop.styles.css

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,33 @@
44
height: 125px;
55
}
66

7-
.circle {
7+
.half-circle-right {
88
position: absolute;
99
box-sizing: border-box;
1010
height: 125px;
1111
width: 125px;
1212
border: 7px solid #00a1de;
1313
border-radius: 50%;
14-
clip-path: inset(0 0 0 50%);
14+
clip-path: inset(0 0 0 60%);
1515
}
1616

17-
.triangle {
17+
.half-circle-left {
18+
position: absolute;
19+
box-sizing: border-box;
20+
height: 125px;
21+
width: 125px;
22+
border: 7px solid #00a1de;
23+
border-radius: 50%;
24+
clip-path: inset(0 60% 0 0);
25+
}
26+
27+
.triangle-right {
1828
position: absolute;
1929
width: 30px;
2030
height: 20px;
2131
background: #00a1de;
2232
margin-top: -7px;
23-
margin-left: 38px;
33+
margin-left: 50px;
2434
clip-path: polygon(50% 0, 0% 100%, 100% 100%);
2535
-moz-transform: rotate(-90deg);
2636
-webkit-transform: rotate(-90deg);
@@ -29,6 +39,21 @@
2939
transform: rotate(-90deg);
3040
}
3141

42+
.triangle-left {
43+
position: absolute;
44+
width: 30px;
45+
height: 20px;
46+
background: #00a1de;
47+
margin-top: 111px;
48+
margin-left: 45px;
49+
clip-path: polygon(50% 0, 0% 100%, 100% 100%);
50+
-moz-transform: rotate(90deg);
51+
-webkit-transform: rotate(90deg);
52+
-o-transform: rotate(90deg);
53+
-ms-transform: rotate(90deg);
54+
transform: rotate(90deg);
55+
}
56+
3257
.spin {
3358
-webkit-transform: rotate(-720deg);
3459
-ms-transform: rotate(-720deg);

0 commit comments

Comments
 (0)