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

Fix/negative token type #478

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react/src/StyledProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const StyledProvider: React.FC<{
colorMode?: COLORMODES;
children?: React.ReactNode;
globalStyles?: any;
_experimentalNestedProvider: boolean;
_experimentalNestedProvider?: boolean;
}> = ({
config,
colorMode,
Expand Down
8 changes: 3 additions & 5 deletions packages/react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,14 +888,12 @@ export type ExtendRNStyle<GenericComponentStyles, key> =
GenericComponentStyles[key];

type WithSizeNegativeValue<Tokens> = keyof Tokens extends 'sizes'
? WithNegativeValue<
//@ts-expect-error
| StringifyToken<keyof Tokens['sizes']>
? //@ts-expect-error
| StringifyToken<keyof Tokens['sizes']>
//@ts-expect-error
| StringifyToken<keyof Tokens['space']>
>
: //@ts-expect-error
WithNegativeValue<StringifyToken<keyof Tokens['space']>>;
StringifyToken<keyof Tokens['space']>;

export type TokenizedRNStyleProps<
GenericComponentStyles,
Expand Down