Skip to content

Commit

Permalink
fix: fix type errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 3, 2023
1 parent 8b2f458 commit d86d1cc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/color-alpha/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { HsvaColor, hsvaToHslaString } from '@uiw/color-convert';
import Interactive, { Interaction } from '@uiw/react-drag-event-interactive';
import { Pointer, PointerProps } from './Pointer';

export * from './Pointer';

export interface AlphaProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
prefixCls?: string;
/** String, Pixel value for picker width. Default `316px` */
Expand Down
4 changes: 2 additions & 2 deletions packages/color-chrome/src/Arrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ interface ArrowProps extends React.HTMLAttributes<HTMLDivElement> {}
export default function Arrow(props: ArrowProps) {
const { style, ...other } = props;
const btn = useRef<HTMLDivElement>(null);
const handleMouseEnter = useCallback((evn) => {
const handleMouseEnter = useCallback(() => {
btn.current!.style['backgroundColor'] = '#e8e8e8';
}, []);

const handleMouseLeave = useCallback((evn) => {
const handleMouseLeave = useCallback(() => {
btn.current!.style['backgroundColor'] = 'transparent';
}, []);
return (
Expand Down
4 changes: 2 additions & 2 deletions packages/color-circle/src/Point.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ interface PointProps extends SwatchRectRenderProps {

export default function Point({ style, title, checked, color, onClick, rectProps }: PointProps) {
const btn = useRef<HTMLDivElement>(null);
const handleMouseEnter = useCallback((evn) => {
const handleMouseEnter = useCallback(() => {
btn.current!.style['transform'] = 'scale(1.2)';
}, []);

const handleMouseLeave = useCallback((evn) => {
const handleMouseLeave = useCallback(() => {
btn.current!.style['transform'] = 'scale(1)';
}, []);

Expand Down
3 changes: 1 addition & 2 deletions packages/color-sketch/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useState, useCallback, Fragment } from 'react';
import Saturation from '@uiw/react-color-saturation';
import Alpha from '@uiw/react-color-alpha';
import Alpha, { PointerProps } from '@uiw/react-color-alpha';
import EditableInput from '@uiw/react-color-editable-input';
import RGBA from '@uiw/react-color-editable-input-rgba';
import { PointerProps } from '@uiw/react-color-alpha/lib/cjs/Pointer';
import Hue from '@uiw/react-color-hue';
import {
validHex,
Expand Down

0 comments on commit d86d1cc

Please sign in to comment.