mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2026-01-08 12:33:50 +00:00
refactor: export and use components props
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user