From 155e90468008ec86a4db781f8cf7ad3744f448e8 Mon Sep 17 00:00:00 2001 From: Ahmad Ilaiwi Date: Mon, 14 Oct 2019 22:03:02 +0300 Subject: [PATCH] [@types/rebass] update SxProp definition (#39054) * [@types/rebass] update SxProp definition `SxProp` should accept `SystemStyleObject` or `rebass` definition of `sx` * [rebass] update rebass tests --- types/rebass/index.d.ts | 3 ++- types/rebass/rebass-tests.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/types/rebass/index.d.ts b/types/rebass/index.d.ts index a80ae35fcc..27b49e568f 100644 --- a/types/rebass/index.d.ts +++ b/types/rebass/index.d.ts @@ -6,6 +6,7 @@ // sara f-p // angusfretwell // orzarchi +// ilaiwi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.1 @@ -31,7 +32,7 @@ export interface BaseProps extends React.RefAttributes { * such that properties that are part of the `Theme` will be transformed to * their corresponding values. Other valid CSS properties are also allowed. */ -export type SxStyleProp = SystemStyleObject & +export type SxStyleProp = SystemStyleObject | Record< string, | SystemStyleObject diff --git a/types/rebass/rebass-tests.tsx b/types/rebass/rebass-tests.tsx index 6287885ca7..f1dc0858d6 100644 --- a/types/rebass/rebass-tests.tsx +++ b/types/rebass/rebass-tests.tsx @@ -75,7 +75,13 @@ export default () => ( > String css prop - +