mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
chore: reduce code by gndelia/codemod-replace-react-fc-typescript
This commit is contained in:
@@ -16,7 +16,7 @@ type GridHandleProps = {
|
||||
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
||||
};
|
||||
|
||||
export const GridHandle: FC<GridHandleProps> = function ({
|
||||
export const GridHandle = function ({
|
||||
blockId,
|
||||
editor,
|
||||
enabledAddItem,
|
||||
@@ -25,7 +25,7 @@ export const GridHandle: FC<GridHandleProps> = function ({
|
||||
draggable,
|
||||
alertHandleId,
|
||||
onMouseEnter,
|
||||
}) {
|
||||
}: GridHandleProps) {
|
||||
const [isMouseDown, setIsMouseDown] = useState<boolean>(false);
|
||||
const handleMouseDown: React.MouseEventHandler<HTMLDivElement> = e => {
|
||||
if (draggable) {
|
||||
|
||||
@@ -20,7 +20,7 @@ export function removePercent(str: string) {
|
||||
return str.replace('%', '');
|
||||
}
|
||||
|
||||
export const Grid: FC<CreateView> = function (props) {
|
||||
export const Grid = function (props: CreateView) {
|
||||
const { block, editor } = props;
|
||||
const gridItemMinWidth = editor.configManager.grid.gridItemMinWidth;
|
||||
const [isOnDrag, setIsOnDrag] = useState<boolean>(false);
|
||||
|
||||
Reference in New Issue
Block a user