diff --git a/lib/__snapshots__/styl.test.tsx.snap b/lib/__snapshots__/styl.test.tsx.snap
index c9b46cd..cfa9c0d 100644
--- a/lib/__snapshots__/styl.test.tsx.snap
+++ b/lib/__snapshots__/styl.test.tsx.snap
@@ -36,6 +36,21 @@ exports[`styl props polymorphic > TouchableWithoutFeedback 1`] = `
`;
+exports[`styl props polymorphic merge props 1`] = `
+
+ Text
+
+`;
+
exports[`styl props renders custom props 1`] = `
{
const json = render.toJSON()
expect(json).toMatchSnapshot()
})
+
+ it('polymorphic merge props', () => {
+ const Title = styl(Text)<{ color?: string }>({ color: 'blue' })
+
+ const render = renderer.create(Text)
+
+ // Snapshot
+ const json = render.toJSON()
+ expect(json).toMatchSnapshot()
+ })
})
describe('theme/provider', () => {
diff --git a/lib/styl.ts b/lib/styl.ts
index 3f534ce..05cc45d 100644
--- a/lib/styl.ts
+++ b/lib/styl.ts
@@ -64,7 +64,7 @@ interface Polymorphic<
> {
= IntrinsicElement>(
props: As extends JSXElementConstructor
- ? OwnProps & { ref?: As } & { as?: As } & AsProps
+ ? DefaultProps & OwnProps & { ref?: As } & { as?: As } & AsProps
: never
): ReactElement | null
}