Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #525 from gluestack/release/@gluestack-style/react…
Browse files Browse the repository at this point in the history
…@1.0.14

Release/@gluestack style/react@1.0.14
  • Loading branch information
ankit-tailor committed Nov 7, 2023
2 parents a5c7cc0 + b9556a9 commit 2d1d4d3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 36 deletions.
6 changes: 6 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @gluestack-style/react

## 1.0.14

### Patch Changes

- Fixed utility props typings [PR](https://github.com/gluestack/gluestack-style/pull/524)

## 1.0.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gluestack-style/react",
"description": "A universal & performant styling library for React Native, Next.js & React",
"version": "1.0.13",
"version": "1.0.14",
"keywords": [
"React Native",
"Next.js",
Expand Down
69 changes: 34 additions & 35 deletions packages/react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,7 @@ export type PropsCombinations =
export type UtilityProps<
GenericComponentStyles,
Variants,
GenericComponentProps,
Tokens = GSConfig['tokens']
GenericComponentProps
> = Omit<
TokenizedRNStyleProps<GetRNStyles<GenericComponentStyles>>,
keyof GenericComponentProps
Expand All @@ -851,41 +850,41 @@ export type UtilityProps<
keyof GenericComponentProps
> &
Partial<{
//@ts-ignore
[key in PropsCombinations]?: Aliases[LastPart<key>] extends keyof GetRNStyles<GenericComponentStyles>
? //@ts-ignore
PropertyTokenType[Aliases[LastPart<key>]] extends 'sizes'
?
| WithSizeNegativeValue<Tokens>
//@ts-ignore
| ExtendRNStyle<GenericComponentStyles, Aliases[LastPart<key>]>
: //@ts-ignore
PropertyTokenType[Aliases[LastPart<key>]] extends 'space'
?
| WithNegativeValue<
StringifyToken<
//@ts-expect-error
keyof Tokens[PropertyTokenType[Aliases[LastPart<key>]]]
[key in PropsCombinations]?: LastPart<key> extends keyof Aliases
? Aliases[LastPart<key>] extends keyof GetRNStyles<GenericComponentStyles>
? PropertyTokenType[Aliases[LastPart<key>]] extends 'sizes'
?
| WithSizeNegativeValue<GSConfig['tokens']>
| ExtendRNStyle<GenericComponentStyles, Aliases[LastPart<key>]>
: PropertyTokenType[Aliases[LastPart<key>]] extends 'space'
?
| WithNegativeValue<
StringifyToken<
keyof GSConfig['tokens'][PropertyTokenType[Aliases[LastPart<key>]]]
>
>
| ExtendRNStyle<
GetRNStyles<GenericComponentStyles>,
Aliases[LastPart<key>]
>
:
| StringifyToken<
keyof GSConfig['tokens'][PropertyTokenType[Aliases[LastPart<key>]]]
>
| ExtendRNStyle<
GetRNStyles<GenericComponentStyles>,
Aliases[LastPart<key>]
>
>
| ExtendRNStyle<
GetRNStyles<GenericComponentStyles>,
//@ts-ignore
Aliases[LastPart<key>]
>
:
| StringifyToken<
//@ts-ignore
keyof Tokens[PropertyTokenType[Aliases[LastPart<key>]]]
>
| ExtendRNStyle<
GetRNStyles<GenericComponentStyles>,
//@ts-ignore
Aliases[LastPart<key>]
>
: never;
: never
: any;
}> &
VerbosedUtilityProps<GenericComponentStyles, Variants, GenericComponentProps>;
Partial<
VerbosedUtilityProps<
GenericComponentStyles,
Variants,
GenericComponentProps
>
>;
// &
// Partial<{
// [key in `$${IState | PLATFORMS | IMediaQueries}-${string}`]?: any;
Expand Down

0 comments on commit 2d1d4d3

Please sign in to comment.