Skip to content

Commit 8bb4c1b

Browse files
committed
style(Chrome): modify style.
1 parent 38a9475 commit 8bb4c1b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

packages/color-chrome/src/index.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const Chrome = React.forwardRef<HTMLDivElement, ChromeProps>((props, ref) => {
7777
let result = hexToHsva(hex);
7878
handleChange({ ...result });
7979
};
80+
const styleSize = { height: 14, width: 14 };
8081
return (
8182
<Github
8283
ref={ref}
@@ -95,7 +96,7 @@ const Chrome = React.forwardRef<HTMLDivElement, ChromeProps>((props, ref) => {
9596
handleChange({ ...hsva, ...newColor, a: hsva.a });
9697
}}
9798
/>
98-
<div style={{ padding: 15, display: 'flex', alignItems: 'center', gap: 15 }}>
99+
<div style={{ padding: 15, display: 'flex', alignItems: 'center', gap: 10 }}>
99100
{isSupportEyeDropper && <EyeDropper onPickColor={handleClickColor} />}
100101
<Alpha
101102
width={28}
@@ -114,7 +115,11 @@ const Chrome = React.forwardRef<HTMLDivElement, ChromeProps>((props, ref) => {
114115
<div style={{ flex: 1 }}>
115116
<Hue
116117
hue={hsva.h}
117-
style={{ width: '100%' }}
118+
style={{ width: '100%', height: 12 }}
119+
pointerProps={{
120+
style: { ...styleSize },
121+
fillProps: { style: styleSize },
122+
}}
118123
bgProps={{
119124
style: { borderRadius: 2 },
120125
}}
@@ -124,7 +129,11 @@ const Chrome = React.forwardRef<HTMLDivElement, ChromeProps>((props, ref) => {
124129
/>
125130
<Alpha
126131
hsva={hsva}
127-
style={{ marginTop: 10 }}
132+
style={{ marginTop: 6, height: 12 }}
133+
pointerProps={{
134+
style: { ...styleSize },
135+
fillProps: { style: styleSize },
136+
}}
128137
bgProps={{
129138
style: { borderRadius: 2 },
130139
}}

0 commit comments

Comments
 (0)