add children to avoid linting errors

This commit is contained in:
proddy
2026-01-10 18:09:17 +01:00
parent a690510903
commit 64c9882d8c
2 changed files with 5 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
import { memo } from 'react'; import { type FC, type PropsWithChildren, memo } from 'react';
import { Box } from '@mui/material'; import { Box } from '@mui/material';
import type { BoxProps } from '@mui/material'; import type { BoxProps } from '@mui/material';
const ButtonRow = memo<BoxProps>(({ children, ...rest }) => ( const ButtonRow: FC<PropsWithChildren<BoxProps>> = memo(({ children, ...rest }) => (
<Box <Box
sx={{ sx={{
'& button, & a, & .MuiCard-root': { '& button, & a, & .MuiCard-root': {

View File

@@ -1,4 +1,4 @@
import { type FC, memo, useMemo } from 'react'; import { type FC, type PropsWithChildren, memo, useMemo } from 'react';
import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined'; import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined';
import ErrorIcon from '@mui/icons-material/Error'; import ErrorIcon from '@mui/icons-material/Error';
@@ -12,6 +12,7 @@ type MessageBoxLevel = 'warning' | 'success' | 'info' | 'error';
export interface MessageBoxProps extends BoxProps { export interface MessageBoxProps extends BoxProps {
level: MessageBoxLevel; level: MessageBoxLevel;
message?: string; message?: string;
children?: React.ReactNode;
} }
const LEVEL_ICONS: Record<MessageBoxLevel, React.ComponentType<SvgIconProps>> = { const LEVEL_ICONS: Record<MessageBoxLevel, React.ComponentType<SvgIconProps>> = {
@@ -28,7 +29,7 @@ const LEVEL_PALETTE_PATHS: Record<MessageBoxLevel, string> = {
error: 'error.dark' error: 'error.dark'
}; };
const MessageBox: FC<MessageBoxProps> = ({ const MessageBox: FC<PropsWithChildren<MessageBoxProps>> = ({
level, level,
message, message,
sx, sx,