Skip to content

Commit f303371

Browse files
committed
fix(Wheel): fix color props issue (#98).
1 parent 5c75028 commit f303371

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

packages/color-wheel/src/Pointer.tsx

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,29 @@ export const Pointer = ({ className, color, left, top, style, prefixCls }: Point
1717
top,
1818
left,
1919
};
20-
return useMemo(
21-
() => (
22-
<div className={`${prefixCls}-pointer ${className || ''}`} style={styleWarp}>
20+
const cls = `${prefixCls}-pointer ${className || ''}`;
21+
return (
22+
<div className={cls} style={styleWarp}>
23+
<div
24+
className={`${prefixCls}-fill`}
25+
style={{
26+
width: 10,
27+
height: 10,
28+
transform: 'translate(-5px, -5px)',
29+
boxShadow: BOXSHADOW,
30+
borderRadius: '50%',
31+
backgroundColor: '#fff',
32+
}}
33+
>
2334
<div
24-
className={`${prefixCls}-fill`}
2535
style={{
26-
width: 10,
27-
height: 10,
28-
transform: 'translate(-5px, -5px)',
29-
boxShadow: BOXSHADOW,
36+
inset: 0,
3037
borderRadius: '50%',
31-
backgroundColor: '#fff',
38+
position: 'absolute',
39+
backgroundColor: color,
3240
}}
33-
>
34-
<div
35-
style={{
36-
inset: 0,
37-
borderRadius: '50%',
38-
position: 'absolute',
39-
backgroundColor: color,
40-
}}
41-
/>
42-
</div>
41+
/>
4342
</div>
44-
),
45-
[top, left, color, className, prefixCls],
43+
</div>
4644
);
4745
};

website/src/components/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default class Markdown extends Component<MarkdownProps, MarkdownState> {
4747
const { source, components, data } = this.state.mdObj || {};
4848
return (
4949
<div className={[styles.warpper, 'wmde-markdown-var'].join(' ')}>
50-
<dark-mode light="Dark" dark="Light"></dark-mode>
50+
<dark-mode permanent light="Dark" dark="Light"></dark-mode>
5151
<div className={styles.markdown}>
5252
<EditorUrl editorUrl={this.editorUrl} />
5353
{this.example && <div className={styles.example}>{this.example}</div>}

0 commit comments

Comments
 (0)