From c0ebbe034afe3a6759dd056fae3d8b342b051a70 Mon Sep 17 00:00:00 2001 From: Jesse Katsumata Date: Thu, 7 Nov 2024 15:00:42 +0900 Subject: [PATCH] fix: format" --- src/index.tsx | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 718af198..9ca58dda 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,52 +1,52 @@ -import React, { forwardRef, useMemo } from "react"; +import { forwardRef, useMemo } from "react"; import { processColor } from "react-native"; import UIMenuView from "./UIMenuView"; import type { - MenuComponentProps, - MenuAction, - ProcessedMenuAction, - NativeActionEvent, - MenuComponentRef, + MenuComponentProps, + MenuAction, + ProcessedMenuAction, + NativeActionEvent, + MenuComponentRef, } from "./types"; import { objectHash } from "./utils"; function processAction(action: MenuAction): ProcessedMenuAction { - return { - ...action, - imageColor: processColor(action.imageColor), - titleColor: processColor(action.titleColor), - subactions: action.subactions?.map((subAction) => processAction(subAction)), - }; + return { + ...action, + imageColor: processColor(action.imageColor), + titleColor: processColor(action.titleColor), + subactions: action.subactions?.map((subAction) => processAction(subAction)), + }; } const defaultHitslop = { top: 0, left: 0, bottom: 0, right: 0 }; const MenuView = forwardRef( - ({ actions, hitSlop = defaultHitslop, ...props }, ref) => { - const processedActions = actions.map((action) => - processAction(action), - ); - const hash = useMemo(() => { - return objectHash(processedActions); - }, [processedActions]); + ({ actions, hitSlop = defaultHitslop, ...props }, ref) => { + const processedActions = actions.map((action) => + processAction(action), + ); + const hash = useMemo(() => { + return objectHash(processedActions); + }, [processedActions]); - return ( - - ); - }, + return ( + + ); + }, ); export { MenuView }; export type { - MenuComponentProps, - MenuComponentRef, - MenuAction, - NativeActionEvent, + MenuComponentProps, + MenuComponentRef, + MenuAction, + NativeActionEvent, };