Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nsaunders authored May 16, 2024
1 parent b8f0f15 commit 6dd2f9e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/react/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
CSSProperties,
Component,
ComponentProps,
ComponentType,
CSSProperties,
ElementType,
PropsWithRef,
PropsWithoutRef,
Expand Down Expand Up @@ -74,17 +74,19 @@ export type BoxComponent<ConditionName, Properties> = <

export type GetProperties<ConfigProperties> = Partial<{
[P in keyof ConfigProperties]: ConfigProperties[P] extends (
value: unknown
) => CSSProperties
? ValidPropertyName<P> & Parameters<ConfigProperties[P]>[0]
value: infer V
) => unknown
? V
: never;
}>;

export type Config<ConditionName extends string, ConfigProperties> = {
conditions?: {
[P in ConditionName]: ValidConditionName<P> & Condition<Selector>;
};
properties?: ConfigProperties;
properties?: {
[P in keyof ConfigProperties]: ValidPropertyName<P> & ConfigProperties[P];
} & Record<string, (value: any) => CSSProperties>;
fallback?: "revert-layer" | "unset";
debug?: boolean;
};
Expand Down

0 comments on commit 6dd2f9e

Please sign in to comment.