Skip to content

Commit

Permalink
fix(Wheel): fix color props issue (#98).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 20, 2022
1 parent 5c75028 commit f303371
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
40 changes: 19 additions & 21 deletions packages/color-wheel/src/Pointer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,29 @@ export const Pointer = ({ className, color, left, top, style, prefixCls }: Point
top,
left,
};
return useMemo(
() => (
<div className={`${prefixCls}-pointer ${className || ''}`} style={styleWarp}>
const cls = `${prefixCls}-pointer ${className || ''}`;
return (
<div className={cls} style={styleWarp}>
<div
className={`${prefixCls}-fill`}
style={{
width: 10,
height: 10,
transform: 'translate(-5px, -5px)',
boxShadow: BOXSHADOW,
borderRadius: '50%',
backgroundColor: '#fff',
}}
>
<div
className={`${prefixCls}-fill`}
style={{
width: 10,
height: 10,
transform: 'translate(-5px, -5px)',
boxShadow: BOXSHADOW,
inset: 0,
borderRadius: '50%',
backgroundColor: '#fff',
position: 'absolute',
backgroundColor: color,
}}
>
<div
style={{
inset: 0,
borderRadius: '50%',
position: 'absolute',
backgroundColor: color,
}}
/>
</div>
/>
</div>
),
[top, left, color, className, prefixCls],
</div>
);
};
2 changes: 1 addition & 1 deletion website/src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class Markdown extends Component<MarkdownProps, MarkdownState> {
const { source, components, data } = this.state.mdObj || {};
return (
<div className={[styles.warpper, 'wmde-markdown-var'].join(' ')}>
<dark-mode light="Dark" dark="Light"></dark-mode>
<dark-mode permanent light="Dark" dark="Light"></dark-mode>
<div className={styles.markdown}>
<EditorUrl editorUrl={this.editorUrl} />
{this.example && <div className={styles.example}>{this.example}</div>}
Expand Down

0 comments on commit f303371

Please sign in to comment.