mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 22:38:56 +08:00
fix: react warning
This commit is contained in:
@@ -3,7 +3,20 @@ import { CSSProperties } from 'react';
|
||||
import { ButtonProps } from '@/ui/button/interface';
|
||||
import { getSize, getButtonColors } from './utils';
|
||||
|
||||
export const StyledIconButton = styled.button<{
|
||||
export const StyledIconButton = styled('button', {
|
||||
shouldForwardProp: prop => {
|
||||
return ![
|
||||
'borderRadius',
|
||||
'top',
|
||||
'right',
|
||||
'width',
|
||||
'height',
|
||||
'hoverBackground',
|
||||
'hoverColor',
|
||||
'hoverStyle',
|
||||
].includes(prop);
|
||||
},
|
||||
})<{
|
||||
width: number;
|
||||
height: number;
|
||||
borderRadius: number;
|
||||
@@ -55,7 +68,13 @@ export const StyledIconButton = styled.button<{
|
||||
};
|
||||
}
|
||||
);
|
||||
export const StyledButton = styled.button<
|
||||
export const StyledButton = styled('button', {
|
||||
shouldForwardProp: prop => {
|
||||
return !['hoverBackground', 'hoverColor', 'hoverStyle', 'type'].includes(
|
||||
prop
|
||||
);
|
||||
},
|
||||
})<
|
||||
Pick<
|
||||
ButtonProps,
|
||||
| 'size'
|
||||
|
||||
Reference in New Issue
Block a user