Settings API: add support for custom objects / arrays (#3154)

This commit is contained in:
Nuckyz 2025-01-22 22:51:11 -03:00 committed by GitHub
parent 317121fc08
commit 5c8ba6e542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 420 additions and 355 deletions

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import type { ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, KeyboardEvent, MouseEvent, PropsWithChildren, PropsWithRef, ReactNode, Ref } from "react";
import type { ComponentPropsWithRef, ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, JSX, KeyboardEvent, MouseEvent, PropsWithChildren, PropsWithRef, ReactNode, Ref } from "react";
import { IconNames } from "./iconNames";
@ -471,15 +471,9 @@ export type ScrollerThin = ComponentType<PropsWithChildren<{
onScroll?(): void;
}>>;
export type Clickable = ComponentType<PropsWithChildren<{
className?: string;
href?: string;
ignoreKeyPress?: boolean;
onClick?(): void;
onKeyPress?(): void;
}>>;
export type Clickable = <T extends "a" | "div" | "span" | "li" = "div">(props: PropsWithChildren<ComponentPropsWithRef<T>> & {
tag?: T;
}) => ReactNode;
export type Avatar = ComponentType<PropsWithChildren<{
className?: string;