Skip to content

Commit 85521d4

Browse files
committed
Angle picker inputs
1 parent 2596cbe commit 85521d4

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

src/components/AnglePicker/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.ap .aph {
2323
width: 6px;
2424
height: 6px;
25-
background-color: #3cad77;
25+
background-color: #4374AD;
2626
display: inline-block;
2727
border-radius: 50%;
2828
position: absolute;

src/components/GradientPickerPopover/index.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,36 @@
3232
padding: 10px 0 0 10px;
3333
border-top: 1px solid rgb(238, 238, 238);
3434
display: flex;
35+
justify-content: space-around;
36+
align-items: center;
3537
flex-wrap: wrap;
3638
position: relative;
3739
}
3840

41+
.gpw .popover .angle-inputs {
42+
border-radius: 4px;
43+
background: #f2f2f2;
44+
display: flex;
45+
flex: 1;
46+
margin: 0 20px;
47+
justify-content: space-around;
48+
align-items: center;
49+
}
50+
51+
.gpw .popover .angle-inputs input {
52+
border: none;
53+
text-align: center;
54+
width: 48px;
55+
color: #0C0C09;
56+
background: inherit;
57+
}
58+
59+
.gpw .popover .angle-inputs span {
60+
padding: 5px;
61+
cursor: pointer;
62+
user-select: none;
63+
}
64+
3965
.gpw .overlay {
4066
position: fixed;
4167
top: 0;

src/components/GradientPickerPopover/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ const GradientPickerPopover = ({
3535
<GradientPicker {...gradientPickerProps} palette={palette} flatStyle/>
3636
{ showAnglePicker && (
3737
<div className="angle-holder">
38-
<AnglePicker angle={angle} setAngle={setAngle} size={36}/>
38+
<AnglePicker angle={angle} setAngle={setAngle} size={32}/>
39+
<div className="angle-inputs">
40+
<span onClick={() => setAngle(angle - 1)}>&#8722;</span>
41+
<input value={`${angle}°`} disabled/>
42+
<span onClick={() => setAngle(angle + 1)}>&#43;</span>
43+
</div>
3944
</div>
4045
)}
4146
</div>

0 commit comments

Comments
 (0)