Skip to content

Commit 863bdd3

Browse files
author
M A Alim
committed
add mid point
1 parent 5bb5424 commit 863bdd3

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-awesome-clock",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"description": "A react component to display clock",
55
"license": "MIT",
66
"author": "M A Alim",

src/lib/components/Clock.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const Clock = (props) => {
4242
/>
4343
))}
4444
<div className="rac-hand-wrapper" style={{ width: size, height: size/2 }}>
45+
<div className="rac-mid-point" style={{ height: size/20, width: size/20, transform: `translateY(${size/40}px)` }}></div>
4546
{live && <Hand height={4*size/10} handID="rac-second-hand" angle={second*6} />}
4647
<Hand height={3*size/10} handID="rac-minute-hand" angle={minute*6+second/10} />
4748
<Hand height={size/5} handID="rac-hour-hand" angle={hour*30+minute/2} />

src/lib/components/clock.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
border-radius: 50%;
66
}
77

8+
.rac-mid-point {
9+
background-color: #000;
10+
border-radius: 50%;
11+
}
12+
813
.rac-hour-body {
914
position: absolute;
1015
inset: 5px;

0 commit comments

Comments
 (0)