diff --git a/src/components/common/CodeEditor.tsx b/src/components/common/CodeEditor.tsx index 4b5c184..590f323 100644 --- a/src/components/common/CodeEditor.tsx +++ b/src/components/common/CodeEditor.tsx @@ -1,7 +1,7 @@ import { css, Theme } from "@mui/material/styles"; import { config } from "ace-builds"; -import { ComponentPropsWithoutRef, memo } from "react"; -import AceEditor from "react-ace"; +import { memo } from "react"; +import AceEditor, { IAceEditorProps } from "react-ace"; // https://github.com/securingsincity/react-ace/issues/725 config.set("basePath", "https://cdn.jsdelivr.net/npm/ace-builds@1.4.14/src-min-noconflict/"); @@ -10,7 +10,7 @@ config.setModuleUrl( "https://cdn.jsdelivr.net/npm/ace-builds@1.4.14/src-min-noconflict/worker-javascript.js" ); -type Props = ComponentPropsWithoutRef; +export type Props = IAceEditorProps; const editor = (theme: Theme) => css` box-shadow: ${theme.shadows[1]}; diff --git a/src/components/common/Configuration.tsx b/src/components/common/Configuration.tsx index e6b243d..ba6fd1f 100644 --- a/src/components/common/Configuration.tsx +++ b/src/components/common/Configuration.tsx @@ -2,7 +2,7 @@ import { Box, Paper, Stack, Typography } from "@mui/material"; import { css, Theme } from "@mui/material/styles"; import { memo, ReactNode } from "react"; -type Props = { +export type Props = { icon: ReactNode; title: string; input: ReactNode; diff --git a/src/components/common/Configurations.tsx b/src/components/common/Configurations.tsx index 6c80624..cd7edbe 100644 --- a/src/components/common/Configurations.tsx +++ b/src/components/common/Configurations.tsx @@ -1,11 +1,11 @@ import { Stack } from "@mui/material"; import equal from "fast-deep-equal"; -import { ComponentPropsWithoutRef, memo } from "react"; +import { memo } from "react"; -import Configuration from "./Configuration"; +import Configuration, { Props as ConfigurationProps } from "./Configuration"; -type Props = { - configurations: ComponentPropsWithoutRef[]; +export type Props = { + configurations: ConfigurationProps[]; }; const StyledComponent = ({ configurations }: Props) => ( diff --git a/src/components/common/Main.tsx b/src/components/common/Main.tsx index eecfce8..c4803ba 100644 --- a/src/components/common/Main.tsx +++ b/src/components/common/Main.tsx @@ -1,12 +1,8 @@ -import { Stack, Typography } from "@mui/material"; +import { Stack, StackProps, Typography } from "@mui/material"; import { css, Theme } from "@mui/material/styles"; -import { ComponentPropsWithoutRef, memo, PropsWithChildren } from "react"; +import { memo, PropsWithChildren } from "react"; -type Props = PropsWithChildren< - { - title: string; - } & ComponentPropsWithoutRef ->; +export type Props = PropsWithChildren<{ title: string } & StackProps>; const mainTitle = (theme: Theme) => css` font-size: ${theme.typography.fontSize * 3}px; diff --git a/src/components/common/MainItem.tsx b/src/components/common/MainItem.tsx index 90f89c8..14281e9 100644 --- a/src/components/common/MainItem.tsx +++ b/src/components/common/MainItem.tsx @@ -1,11 +1,7 @@ -import { Box, Stack, Typography } from "@mui/material"; -import { ComponentPropsWithoutRef, memo, PropsWithChildren } from "react"; +import { Box, Stack, StackProps, Typography } from "@mui/material"; +import { memo, PropsWithChildren } from "react"; -type Props = PropsWithChildren< - { - title: string; - } & ComponentPropsWithoutRef ->; +export type Props = PropsWithChildren<{ title: string } & StackProps>; const StyledComponent = ({ children, title, ...stackProps }: Props) => ( // eslint-disable-next-line react/jsx-props-no-spreading diff --git a/src/components/common/TextField.tsx b/src/components/common/TextField.tsx index 89a7ebf..670af6c 100644 --- a/src/components/common/TextField.tsx +++ b/src/components/common/TextField.tsx @@ -1,7 +1,7 @@ -import { TextField } from "@mui/material"; -import { ComponentPropsWithoutRef, memo } from "react"; +import { TextField, TextFieldProps } from "@mui/material"; +import { memo } from "react"; -type Props = ComponentPropsWithoutRef; +export type Props = TextFieldProps; const StyledComponent = (props: Props) => ( []; +export type Props = { + tools: ToolCardProps[]; }; const StyledComponent = ({ tools }: Props) => ( diff --git a/src/components/common/index.ts b/src/components/common/index.ts index e775486..66bfa76 100644 --- a/src/components/common/index.ts +++ b/src/components/common/index.ts @@ -1,7 +1,17 @@ -import Configurations from "./Configurations"; -import Main from "./Main"; -import MainItem from "./MainItem"; -import TextField from "./TextField"; -import ToolCardGrid from "./ToolCardGrid"; +import { Props as CodeEditorProps } from "./CodeEditor"; +import Configurations, { Props as ConfigurationsProps } from "./Configurations"; +import Main, { Props as MainProps } from "./Main"; +import MainItem, { Props as MainItemProps } from "./MainItem"; +import TextField, { Props as TextFieldProps } from "./TextField"; +import ToolCardGrid, { Props as ToolCardGridProps } from "./ToolCardGrid"; + +export type { + CodeEditorProps, + ConfigurationsProps, + MainProps, + MainItemProps, + TextFieldProps, + ToolCardGridProps, +}; export { Configurations, Main, MainItem, TextField, ToolCardGrid }; diff --git a/src/components/layout/Drawer.tsx b/src/components/layout/Drawer.tsx index ed7173b..58fc984 100644 --- a/src/components/layout/Drawer.tsx +++ b/src/components/layout/Drawer.tsx @@ -1,17 +1,17 @@ import { Home } from "@mui/icons-material"; import { Box, Divider, Drawer, List, Stack } from "@mui/material"; import { css } from "@mui/material/styles"; -import { ComponentPropsWithoutRef, memo } from "react"; +import { memo } from "react"; import { drawerToolGroups } from "@/data/tools"; import { pagesPath } from "@/libs/$path"; -import DrawerCollapseItem from "./DrawerCollapseItem"; +import DrawerCollapseItem, { Props as DrawerCollapseItemProps } from "./DrawerCollapseItem"; import DrawerItem from "./DrawerItem"; import SearchBar from "./SearchBar"; type Props = { - toolGroups: ComponentPropsWithoutRef[]; + toolGroups: DrawerCollapseItemProps[]; }; export const drawerWidth = 300; diff --git a/src/components/layout/DrawerCollapseItem.tsx b/src/components/layout/DrawerCollapseItem.tsx index 21e9401..dcb1b82 100644 --- a/src/components/layout/DrawerCollapseItem.tsx +++ b/src/components/layout/DrawerCollapseItem.tsx @@ -1,22 +1,22 @@ import { ExpandLess, ExpandMore } from "@mui/icons-material"; import { Collapse, List, ListItemButton, ListItemText } from "@mui/material"; import equal from "fast-deep-equal"; -import { ComponentPropsWithoutRef, memo, MouseEventHandler, useCallback, useState } from "react"; +import { memo, MouseEventHandler, useCallback, useState } from "react"; -import DrawerItem from "./DrawerItem"; -import DrawerItemIcon from "./DrawerItemIcon"; +import DrawerItem, { Props as DrawerItemProps } from "./DrawerItem"; +import DrawerItemIcon, { Props as DrawerItemIconProps } from "./DrawerItemIcon"; -type ContainerProps = { +export type Props = { title: string; - tools: ComponentPropsWithoutRef[]; -} & ComponentPropsWithoutRef; + tools: DrawerItemProps[]; +} & DrawerItemIconProps; -type Props = { +type ComponentProps = { open: boolean; onClick: MouseEventHandler; -} & ContainerProps; +} & Props; -const StyledComponent = ({ icon, title, tools, open, onClick }: Props) => ( +const StyledComponent = ({ icon, title, tools, open, onClick }: ComponentProps) => ( <> @@ -42,7 +42,7 @@ const StyledComponent = ({ icon, title, tools, open, onClick }: Props) => ( export const Component = memo(StyledComponent, equal); -const Container = ({ icon, title, tools }: ContainerProps) => { +const Container = ({ icon, title, tools }: Props) => { const [open, setOpen] = useState(false); const onClick = useCallback(() => { diff --git a/src/components/layout/DrawerItem.tsx b/src/components/layout/DrawerItem.tsx index ae23e0e..a4c8089 100644 --- a/src/components/layout/DrawerItem.tsx +++ b/src/components/layout/DrawerItem.tsx @@ -1,16 +1,16 @@ import { Box, ListItemButton, ListItemText, Tooltip } from "@mui/material"; import { css } from "@mui/material/styles"; import NextLink, { LinkProps } from "next/link"; -import { ComponentPropsWithoutRef, memo } from "react"; +import { memo } from "react"; -import DrawerItemIcon from "./DrawerItemIcon"; +import DrawerItemIcon, { Props as DrawerItemIconProps } from "./DrawerItemIcon"; -type Props = { +export type Props = { title: string; disabled?: boolean; subItem?: true; } & Pick & - ComponentPropsWithoutRef; + DrawerItemIconProps; const indent = css` text-indent: 40px; diff --git a/src/components/layout/DrawerItemIcon.tsx b/src/components/layout/DrawerItemIcon.tsx index bd6d0f2..010c0cb 100644 --- a/src/components/layout/DrawerItemIcon.tsx +++ b/src/components/layout/DrawerItemIcon.tsx @@ -2,7 +2,7 @@ import { ListItemIcon } from "@mui/material"; import { css } from "@mui/material/styles"; import { memo, ReactNode } from "react"; -type Props = { +export type Props = { icon: ReactNode; }; diff --git a/src/components/pages/converters/json-yaml/Configuration.tsx b/src/components/pages/converters/json-yaml/Configuration.tsx index 9e4771d..a152a43 100644 --- a/src/components/pages/converters/json-yaml/Configuration.tsx +++ b/src/components/pages/converters/json-yaml/Configuration.tsx @@ -12,7 +12,7 @@ export const isSpaces = (x: number): x is Spaces => spacesArray.includes(x as Sp type OnSelectChange = NonNullable["onChange"]>; -type Props = { +export type Props = { spaces: Spaces; onSpacesChange: OnSelectChange; }; diff --git a/src/components/pages/converters/json-yaml/Content.tsx b/src/components/pages/converters/json-yaml/Content.tsx index 83daab7..de4e37d 100644 --- a/src/components/pages/converters/json-yaml/Content.tsx +++ b/src/components/pages/converters/json-yaml/Content.tsx @@ -1,11 +1,12 @@ import { Skeleton, Stack } from "@mui/material"; import dynamic from "next/dynamic"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; import YAML from "yaml"; import { Main, MainItem } from "@/components/common"; +import { Props as CodeEditorProps } from "@/components/common/CodeEditor"; -import Configuration, { isSpaces, Spaces } from "./Configuration"; +import Configuration, { Props as ConfigurationProps, isSpaces, Spaces } from "./Configuration"; // https://github.com/securingsincity/react-ace/issues/27 const CodeEditor = dynamic( @@ -20,15 +21,15 @@ const CodeEditor = dynamic( { ssr: false, loading: () => } ); -type CodeValue = NonNullable["value"]>; -type OnCodeChange = NonNullable["onChange"]>; +type CodeValue = NonNullable; +type OnCodeChange = NonNullable; type Props = { json: CodeValue; yaml: CodeValue; onJsonChange: OnCodeChange; onYamlChange: OnCodeChange; -} & ComponentPropsWithoutRef; +} & ConfigurationProps; const StyledComponent = ({ json, diff --git a/src/components/pages/converters/number-base/Configuration.tsx b/src/components/pages/converters/number-base/Configuration.tsx index 5c19e63..55edc21 100644 --- a/src/components/pages/converters/number-base/Configuration.tsx +++ b/src/components/pages/converters/number-base/Configuration.tsx @@ -8,7 +8,7 @@ import { Configurations } from "@/components/common"; type SwitchChecked = NonNullable; type OnSwitchChange = NonNullable; -type Props = { +export type Props = { format: SwitchChecked; onFormatChange: OnSwitchChange; }; diff --git a/src/components/pages/converters/number-base/Content.tsx b/src/components/pages/converters/number-base/Content.tsx index d12c0de..7893a37 100644 --- a/src/components/pages/converters/number-base/Content.tsx +++ b/src/components/pages/converters/number-base/Content.tsx @@ -1,7 +1,7 @@ import { Stack } from "@mui/material"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { Main, MainItem, TextField, TextFieldProps } from "@/components/common"; import { formatBinary, formatDecimal, @@ -17,10 +17,10 @@ import { unformatOctal, } from "@/libs/string"; -import Configuration from "./Configuration"; +import Configuration, { Props as ConfigurationProps } from "./Configuration"; -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type OnTextFieldChange = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type OnTextFieldChange = NonNullable; type Props = { dec: TextFieldValue; @@ -31,7 +31,7 @@ type Props = { onHexChange: OnTextFieldChange; onOctChange: OnTextFieldChange; onBinChange: OnTextFieldChange; -} & ComponentPropsWithoutRef; +} & ConfigurationProps; const StyledComponent = ({ format, diff --git a/src/components/pages/encoders-decoders/base64/Content.tsx b/src/components/pages/encoders-decoders/base64/Content.tsx index 7db2009..1377536 100644 --- a/src/components/pages/encoders-decoders/base64/Content.tsx +++ b/src/components/pages/encoders-decoders/base64/Content.tsx @@ -1,10 +1,10 @@ import { encode, decode, isValid } from "js-base64"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { Main, MainItem, TextField, TextFieldProps } from "@/components/common"; -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type OnTextFieldChange = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type OnTextFieldChange = NonNullable; type Props = { decoded: TextFieldValue; diff --git a/src/components/pages/encoders-decoders/html/Content.tsx b/src/components/pages/encoders-decoders/html/Content.tsx index de79a87..908c129 100644 --- a/src/components/pages/encoders-decoders/html/Content.tsx +++ b/src/components/pages/encoders-decoders/html/Content.tsx @@ -1,10 +1,10 @@ import { decode, encode } from "html-entities"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { Main, MainItem, TextField, TextFieldProps } from "@/components/common"; -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type OnTextFieldChange = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type OnTextFieldChange = NonNullable; type Props = { decoded: TextFieldValue; diff --git a/src/components/pages/encoders-decoders/jwt/Content.tsx b/src/components/pages/encoders-decoders/jwt/Content.tsx index e1e45fe..91620c4 100644 --- a/src/components/pages/encoders-decoders/jwt/Content.tsx +++ b/src/components/pages/encoders-decoders/jwt/Content.tsx @@ -1,8 +1,8 @@ import { Skeleton } from "@mui/material"; import dynamic from "next/dynamic"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { CodeEditorProps, Main, MainItem, TextField, TextFieldProps } from "@/components/common"; import { decode } from "@/libs/jwt"; // https://github.com/securingsincity/react-ace/issues/27 @@ -15,9 +15,9 @@ const CodeEditor = dynamic( { ssr: false, loading: () => } ); -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type CodeValue = NonNullable["value"]>; -type OnTextFieldChange = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type CodeValue = NonNullable; +type OnTextFieldChange = NonNullable; type Props = { jwt: TextFieldValue; diff --git a/src/components/pages/encoders-decoders/url/Content.tsx b/src/components/pages/encoders-decoders/url/Content.tsx index 20c2403..14bea3c 100644 --- a/src/components/pages/encoders-decoders/url/Content.tsx +++ b/src/components/pages/encoders-decoders/url/Content.tsx @@ -1,9 +1,9 @@ -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { Main, MainItem, TextField, TextFieldProps } from "@/components/common"; -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type OnTextFieldChange = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type OnTextFieldChange = NonNullable; type Props = { decoded: TextFieldValue; diff --git a/src/components/pages/formatters/json/Configuration.tsx b/src/components/pages/formatters/json/Configuration.tsx index 40563e7..a0f115d 100644 --- a/src/components/pages/formatters/json/Configuration.tsx +++ b/src/components/pages/formatters/json/Configuration.tsx @@ -12,7 +12,7 @@ export const isSpaces = (x: number): x is Spaces => spacesArray.includes(x as Sp type OnSelectChange = NonNullable["onChange"]>; -type Props = { +export type Props = { spaces: Spaces; onSpacesChange: OnSelectChange; }; diff --git a/src/components/pages/formatters/json/Content.tsx b/src/components/pages/formatters/json/Content.tsx index c3d7680..29726a6 100644 --- a/src/components/pages/formatters/json/Content.tsx +++ b/src/components/pages/formatters/json/Content.tsx @@ -1,10 +1,10 @@ import { Skeleton, Stack } from "@mui/material"; import dynamic from "next/dynamic"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem } from "@/components/common"; +import { CodeEditorProps, Main, MainItem } from "@/components/common"; -import Configuration, { isSpaces, Spaces } from "./Configuration"; +import Configuration, { Props as ConfigurationProps, isSpaces, Spaces } from "./Configuration"; // https://github.com/securingsincity/react-ace/issues/27 const CodeEditor = dynamic( @@ -16,14 +16,14 @@ const CodeEditor = dynamic( { ssr: false, loading: () => } ); -type CodeValue = NonNullable["value"]>; -type OnCodeChange = NonNullable["onChange"]>; +type CodeValue = NonNullable; +type OnCodeChange = NonNullable; type Props = { json: CodeValue; formatted: CodeValue; onJsonChange: OnCodeChange; -} & ComponentPropsWithoutRef; +} & ConfigurationProps; const StyledComponent = ({ json, formatted, spaces, onJsonChange, onSpacesChange }: Props) => (
diff --git a/src/components/pages/generators/hash/Configuration.tsx b/src/components/pages/generators/hash/Configuration.tsx index d4e294a..7d58f5b 100644 --- a/src/components/pages/generators/hash/Configuration.tsx +++ b/src/components/pages/generators/hash/Configuration.tsx @@ -8,7 +8,7 @@ import { Configurations } from "@/components/common"; type SwitchChecked = NonNullable; type OnSwitchChange = NonNullable; -type Props = { +export type Props = { uppercase: SwitchChecked; onCaseChange: OnSwitchChange; }; diff --git a/src/components/pages/generators/hash/Content.tsx b/src/components/pages/generators/hash/Content.tsx index c8a95e9..a347c45 100644 --- a/src/components/pages/generators/hash/Content.tsx +++ b/src/components/pages/generators/hash/Content.tsx @@ -1,13 +1,13 @@ import { Stack } from "@mui/material"; import createHash from "create-hash"; // smaller bundle size than Node.js standard library -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { Main, MainItem, TextField, TextFieldProps } from "@/components/common"; -import Configuration from "./Configuration"; +import Configuration, { Props as ConfigurationProps } from "./Configuration"; -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type OnTextFieldChange = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type OnTextFieldChange = NonNullable; type Props = { input: TextFieldValue; @@ -16,7 +16,7 @@ type Props = { sha256: TextFieldValue; sha512: TextFieldValue; onInputChange: OnTextFieldChange; -} & ComponentPropsWithoutRef; +} & ConfigurationProps; const StyledComponent = ({ uppercase, diff --git a/src/components/pages/generators/uuid/Configuration.tsx b/src/components/pages/generators/uuid/Configuration.tsx index 7bc48d1..bf9dbc5 100644 --- a/src/components/pages/generators/uuid/Configuration.tsx +++ b/src/components/pages/generators/uuid/Configuration.tsx @@ -16,7 +16,7 @@ type SwitchChecked = NonNullable; type OnSwitchChange = NonNullable; type OnSelectChange = NonNullable["onChange"]>; -type Props = { +export type Props = { hyphens: SwitchChecked; uppercase: SwitchChecked; uuidVersion: UuidVersion; diff --git a/src/components/pages/generators/uuid/Content.tsx b/src/components/pages/generators/uuid/Content.tsx index 0e6346a..3eb26e4 100644 --- a/src/components/pages/generators/uuid/Content.tsx +++ b/src/components/pages/generators/uuid/Content.tsx @@ -1,22 +1,26 @@ -import { Button, Stack, Typography } from "@mui/material"; +import { Button, ButtonProps, Stack, Typography } from "@mui/material"; import { range } from "fp-ts/NonEmptyArray"; -import { ComponentPropsWithoutRef, memo, useCallback, useState } from "react"; +import { memo, useCallback, useState } from "react"; -import { Main, MainItem, TextField } from "@/components/common"; +import { Main, MainItem, TextField, TextFieldProps } from "@/components/common"; import { uuid } from "@/libs/uuid"; -import Configuration, { isUuidVersion, UuidVersion } from "./Configuration"; +import Configuration, { + Props as ConfigurationProps, + isUuidVersion, + UuidVersion, +} from "./Configuration"; -type TextFieldValue = ComponentPropsWithoutRef["value"]; -type OnTextFieldChange = NonNullable["onChange"]>; -type OnButtonClick = NonNullable["onChange"]>; +type TextFieldValue = TextFieldProps["value"]; +type OnTextFieldChange = NonNullable; +type OnButtonClick = NonNullable; type Props = { generates: TextFieldValue; uuids: TextFieldValue; onGeneratesChange: OnTextFieldChange; onGenerateClick: OnButtonClick; -} & ComponentPropsWithoutRef; +} & ConfigurationProps; const StyledComponent = ({ hyphens, diff --git a/src/components/pages/home/Content.tsx b/src/components/pages/home/Content.tsx index 3d6142b..5e5e400 100644 --- a/src/components/pages/home/Content.tsx +++ b/src/components/pages/home/Content.tsx @@ -1,9 +1,9 @@ -import { ComponentPropsWithoutRef, memo } from "react"; +import { memo } from "react"; -import { Main, ToolCardGrid } from "@/components/common"; +import { Main, ToolCardGrid, ToolCardGridProps } from "@/components/common"; import { homeTools } from "@/data/tools"; -type Props = ComponentPropsWithoutRef; +type Props = ToolCardGridProps; const StyledComponent = ({ tools }: Props) => (
diff --git a/src/components/pages/search/Content.tsx b/src/components/pages/search/Content.tsx index 6e49e89..5f16dee 100644 --- a/src/components/pages/search/Content.tsx +++ b/src/components/pages/search/Content.tsx @@ -1,13 +1,13 @@ import equal from "fast-deep-equal"; import Fuse from "fuse.js"; -import { ComponentPropsWithoutRef, memo } from "react"; +import { memo } from "react"; import { selector, useRecoilValue } from "recoil"; -import { Main, ToolCardGrid } from "@/components/common"; +import { Main, ToolCardGrid, ToolCardGridProps } from "@/components/common"; import { searchTextState } from "@/components/layout/states"; import { homeTools } from "@/data/tools"; -type Props = ComponentPropsWithoutRef; +type Props = ToolCardGridProps; const StyledComponent = ({ tools }: Props) => (