Skip to content

Commit 6f3ee3f

Browse files
author
Kent C. Dodds
authored
fix(TS): allow CSSObject on @emotion/styled
1 parent b966abd commit 6f3ee3f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/styled-base/types/index.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@
1212
* a style of that component.
1313
*/
1414

15-
import { ComponentSelector, Interpolation } from '@emotion/serialize'
15+
import { ComponentSelector, Interpolation, CSSObject } from '@emotion/serialize'
1616
import * as React from 'react'
1717

1818
import { Omit, Overwrapped, PropsOf } from './helper'
1919

2020
export {
2121
ArrayInterpolation,
22-
CSSObject,
2322
FunctionInterpolation,
2423
ObjectInterpolation
2524
} from '@emotion/serialize'
2625

27-
export { ComponentSelector, Interpolation }
26+
export { ComponentSelector, Interpolation, CSSObject }
2827

2928
type JSXInEl = JSX.IntrinsicElements
3029

@@ -72,7 +71,7 @@ export interface CreateStyledComponentBase<
7271
ReactClassPropKeys
7372
> = Omit<InnerProps & ExtraProps, ReactClassPropKeys>
7473
>(
75-
template: TemplateStringsArray,
74+
template: TemplateStringsArray | CSSObject,
7675
...styles: Array<Interpolation<WithTheme<StyleProps, Theme>>>
7776
): StyledComponent<InnerProps, StyleProps, Theme>
7877
}

0 commit comments

Comments
 (0)