mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-17 08:54:27 +02:00
optimize various base components
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { ElementProps, Box as MantineBox, BoxProps as MantineBoxProps } from '@mantine/core';
|
||||
import { memo } from 'react';
|
||||
|
||||
export interface BoxProps extends ElementProps<'div', keyof MantineBoxProps>, MantineBoxProps {}
|
||||
|
||||
export const Box = ({ children, ...props }: BoxProps) => {
|
||||
export const Box = memo(({ children, ...props }: BoxProps) => {
|
||||
return <MantineBox {...props}>{children}</MantineBox>;
|
||||
};
|
||||
});
|
||||
|
||||
Box.displayName = 'Box';
|
||||
|
||||
Reference in New Issue
Block a user