mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-11 10:57:38 +03:00
Core React 19 upgrade with all necessary type fixes: - Update RefObject types to accept T | null (React 19 refs always nullable) - Add JSX namespace imports (no longer global in React 19) - Add initial values to useRef calls (required in React 19) - Fix ReactElement.props unknown type in config-form components - Fix IconWrapper interface to use HTMLAttributes instead of index signature - Add monaco-editor as dev dependency for type declarations - Upgrade react-konva to v19, eslint-plugin-react-hooks to v5
22 lines
489 B
TypeScript
22 lines
489 B
TypeScript
import { ForwardedRef, forwardRef } from "react";
|
|
import { IconType } from "react-icons";
|
|
|
|
interface IconWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
icon: IconType;
|
|
className?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
const IconWrapper = forwardRef(
|
|
(
|
|
{ icon: Icon, className, ...props }: IconWrapperProps,
|
|
ref: ForwardedRef<HTMLDivElement>,
|
|
) => (
|
|
<div {...props} ref={ref}>
|
|
<Icon className={className} />
|
|
</div>
|
|
),
|
|
);
|
|
|
|
export default IconWrapper;
|