mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 17:30:25 -04:00
c3119ea1ea
## Problem While trying to update `react` to version `19`, I noticed type related errors that can be fixed in version `18`, mostly usage of `JSX.Element` instead of `ReactNode`. ## Solution - Use `ReactNode` instead of `JSX.Element` - Fix some invalid usage of `rechart` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Refactor** * Standardized React component type annotations across the codebase for improved type consistency and flexibility. * Updated component prop types to accept a broader range of renderable content. * **Bug Fixes** * Adjusted chart layout positioning to improve visual alignment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
20 lines
491 B
TypeScript
20 lines
491 B
TypeScript
import type { ReactNode } from 'react'
|
|
|
|
interface Props {
|
|
icon: ReactNode
|
|
text: ReactNode
|
|
}
|
|
|
|
const FormBoxEmpty = ({ icon, text }: Props) => {
|
|
return (
|
|
<div className="flex items-center justify-center flex-row py-4 space-x-2">
|
|
<div className="relative bg-surface-100 text-foreground-lighter w-6 h-6 rounded-full flex items-center justify-center">
|
|
{icon}
|
|
</div>
|
|
<p className="text-foreground-light">{text}</p>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default FormBoxEmpty
|