mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 03:54:28 +08:00
2acb7b217a
* site: use css token * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix * fix: fix
37 lines
975 B
TypeScript
37 lines
975 B
TypeScript
import React from 'react';
|
|
import { createStyles } from 'antd-style';
|
|
import classNames from 'classnames';
|
|
|
|
const useStyle = createStyles(({ css }) => ({
|
|
siteMask: css`
|
|
z-index: 1;
|
|
position: relative;
|
|
`,
|
|
}));
|
|
|
|
export interface GroupMaskLayerProps {
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
onMouseMove?: React.MouseEventHandler<HTMLDivElement>;
|
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
}
|
|
|
|
const GroupMaskLayer: React.FC<React.PropsWithChildren<GroupMaskLayerProps>> = (props) => {
|
|
const { children, className, style, onMouseMove, onMouseEnter, onMouseLeave } = props;
|
|
const { styles } = useStyle();
|
|
return (
|
|
<div
|
|
style={style}
|
|
className={classNames(className, styles.siteMask)}
|
|
onMouseMove={onMouseMove}
|
|
onMouseEnter={onMouseEnter}
|
|
onMouseLeave={onMouseLeave}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default GroupMaskLayer;
|