mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
[@types/rebass] update SxProp definition (#39054)
* [@types/rebass] update SxProp definition `SxProp` should accept `SystemStyleObject` or `rebass` definition of `sx` * [rebass] update rebass tests
This commit is contained in:
committed by
Andrew Branch
parent
24e1bf9c9d
commit
155e904680
Vendored
+2
-1
@@ -6,6 +6,7 @@
|
||||
// sara f-p <https://github.com/gretzky>
|
||||
// angusfretwell <https://github.com/angusfretwell>
|
||||
// orzarchi <https://github.com/orzarchi>
|
||||
// ilaiwi <https://github.com/ilaiwi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
@@ -31,7 +32,7 @@ export interface BaseProps extends React.RefAttributes<any> {
|
||||
* 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
|
||||
|
||||
@@ -75,7 +75,13 @@ export default () => (
|
||||
>
|
||||
String css prop
|
||||
</Box>
|
||||
|
||||
<Button sx={theme => ({
|
||||
bg: "magenta",
|
||||
border: "1em",
|
||||
borderRadius: "1em"
|
||||
})}>
|
||||
Button
|
||||
</Button>
|
||||
<CssBox />
|
||||
</Flex>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user