refactor: export and use components props

This commit is contained in:
rusconn
2022-04-06 20:28:17 +09:00
parent dfb6461eef
commit a06ea5bad9
29 changed files with 119 additions and 112 deletions

View File

@@ -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<typeof Stack>
>;
export type Props = PropsWithChildren<{ title: string } & StackProps>;
const StyledComponent = ({ children, title, ...stackProps }: Props) => (
// eslint-disable-next-line react/jsx-props-no-spreading