diff --git a/.changeset/yellow-lies-act.md b/.changeset/yellow-lies-act.md new file mode 100644 index 0000000..f31d9ba --- /dev/null +++ b/.changeset/yellow-lies-act.md @@ -0,0 +1,5 @@ +--- +"@embellish/react": patch +--- + +fix for missing properties when no conditions are specified diff --git a/packages/react/index.d.ts b/packages/react/index.d.ts index 63fab15..8bd0650 100644 --- a/packages/react/index.d.ts +++ b/packages/react/index.d.ts @@ -71,10 +71,7 @@ export type BoxComponent = < JSX.LibraryManagedAttributes>, "style" > & - StyleProps< - "initial" | Exclude, - Properties - > + StyleProps<"initial" | ConditionName | LocalConditionName, Properties> ) => JSX.Element; export type GetProperties = Partial<{ @@ -105,7 +102,11 @@ export type EmbellishResult = { Box: BoxComponent; }; -export type EmbellishFn = ( +export type EmbellishFn = < + Conditions, + ConfigProperties, + ConditionName = Conditions extends Record ? C : never +>( config: Config ) => EmbellishResult>;