diff --git a/.all-contributorsrc b/.all-contributorsrc
index c3522897..a4aa9721 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -547,6 +547,16 @@
"code",
"test"
]
+ },
+ {
+ "login": "tikotzky",
+ "name": "Mordy Tikotzky",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/200528?v=4",
+ "profile": "https://github.com/tikotzky",
+ "contributions": [
+ "bug",
+ "code"
+ ]
}
]
}
diff --git a/README.md b/README.md
index edcd5d1e..8eadf723 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
[![downloads][downloads-badge]][npmcharts]
[![MIT License][license-badge]][license]
-[![All Contributors](https://img.shields.io/badge/all_contributors-57-orange.svg?style=flat-square)](#contributors)
+[![All Contributors](https://img.shields.io/badge/all_contributors-58-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Chat][chat-badge]][chat]
[![Code of Conduct][coc-badge]][coc]
@@ -162,7 +162,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Lufty Wiranda](http://instagram.com/luftywiranda13)
[π»](https://github.com/paypal/glamorous/commits?author=luftywiranda13 "Code") | [
Ansuman Shah](https://github.com/ansumanshah)
[π»](https://github.com/paypal/glamorous/commits?author=ansumanshah "Code") [π](https://github.com/paypal/glamorous/commits?author=ansumanshah "Documentation") | [
Travis LaDuke](http://-)
[π‘](#example-laduke "Examples") | [
AydΔ±n ΓaΔrΔ± Dumlu](https://github.com/acgrdumlu)
[π](https://github.com/paypal/glamorous/issues?q=author%3Aacgrdumlu "Bug reports") [π»](https://github.com/paypal/glamorous/commits?author=acgrdumlu "Code") | [
Maja Wichrowska](https://github.com/majapw)
[π](https://github.com/paypal/glamorous/issues?q=author%3Amajapw "Bug reports") | [
Tom Liu](https://github.com/gt3240)
[π](https://github.com/paypal/glamorous/commits?author=gt3240 "Documentation") | [
Siddharth Kshetrapal](https://github.com/siddharthkp)
[β οΈ](https://github.com/paypal/glamorous/commits?author=siddharthkp "Tests") [π§](#tool-siddharthkp "Tools") |
| [
WillowHQ](https://github.com/WillowHQ)
[π](https://github.com/paypal/glamorous/commits?author=WillowHQ "Documentation") | [
Mohammad Rajabifard](https://tarino.ir)
[π](https://github.com/paypal/glamorous/issues?q=author%3Amorajabi "Bug reports") [π](https://github.com/paypal/glamorous/commits?author=morajabi "Documentation") | [
Omar Albacha](https://github.com/Oalbacha)
[π»](https://github.com/paypal/glamorous/commits?author=Oalbacha "Code") [π](https://github.com/paypal/glamorous/commits?author=Oalbacha "Documentation") | [
tdeschryver](https://github.com/tdeschryver)
[π»](https://github.com/paypal/glamorous/commits?author=tdeschryver "Code") [β οΈ](https://github.com/paypal/glamorous/commits?author=tdeschryver "Tests") | [
Dylan Mozlowski](https://github.com/DylanMoz)
[π»](https://github.com/paypal/glamorous/commits?author=DylanMoz "Code") | [
andretshurotshka](https://github.com/goodmind)
[π»](https://github.com/paypal/glamorous/commits?author=goodmind "Code") [β οΈ](https://github.com/paypal/glamorous/commits?author=goodmind "Tests") | [
Danila](https://github.com/O4epegb)
[β οΈ](https://github.com/paypal/glamorous/commits?author=O4epegb "Tests") |
| [
Junyoung Clare Jang](http://ailrun.github.io/)
[π»](https://github.com/paypal/glamorous/commits?author=Ailrun "Code") [β οΈ](https://github.com/paypal/glamorous/commits?author=Ailrun "Tests") | [
BjΓΆrn Ricks](https://twitter.com/bjoernricks)
[π](https://github.com/paypal/glamorous/issues?q=author%3Abjoernricks "Bug reports") [π»](https://github.com/paypal/glamorous/commits?author=bjoernricks "Code") [π](https://github.com/paypal/glamorous/commits?author=bjoernricks "Documentation") [β οΈ](https://github.com/paypal/glamorous/commits?author=bjoernricks "Tests") | [
Tyler Deitz](http://tylerdeitz.com)
[π»](https://github.com/paypal/glamorous/commits?author=tvler "Code") | [
Shovan Chatterjee](https://twitter.com/shovan_ch)
[π](https://github.com/paypal/glamorous/commits?author=shovanch "Documentation") | [
johnjessewood](https://github.com/johnjesse)
[π»](https://github.com/paypal/glamorous/commits?author=johnjesse "Code") | [
Daniel](https://www.danielberndt.net)
[π»](https://github.com/paypal/glamorous/commits?author=danielberndt "Code") [β οΈ](https://github.com/paypal/glamorous/commits?author=danielberndt "Tests") | [
Ken Powers](https://knpw.rs)
[π€](#ideas-knpwrs "Ideas, Planning, & Feedback") |
-| [
John Grishin](http://johngrish.in)
[π](https://github.com/paypal/glamorous/issues?q=author%3Aexah "Bug reports") [π»](https://github.com/paypal/glamorous/commits?author=exah "Code") [β οΈ](https://github.com/paypal/glamorous/commits?author=exah "Tests") |
+| [
John Grishin](http://johngrish.in)
[π](https://github.com/paypal/glamorous/issues?q=author%3Aexah "Bug reports") [π»](https://github.com/paypal/glamorous/commits?author=exah "Code") [β οΈ](https://github.com/paypal/glamorous/commits?author=exah "Tests") | [
Mordy Tikotzky](https://github.com/tikotzky)
[π](https://github.com/paypal/glamorous/issues?q=author%3Atikotzky "Bug reports") [π»](https://github.com/paypal/glamorous/commits?author=tikotzky "Code") |
diff --git a/src/__tests__/create-glamorous.with-component.js b/src/__tests__/create-glamorous.with-component.js
index ab585165..b8b43971 100644
--- a/src/__tests__/create-glamorous.with-component.js
+++ b/src/__tests__/create-glamorous.with-component.js
@@ -63,3 +63,9 @@ test('resulting component can have its styles extended further', () => {
render(),
).toMatchSnapshot('overriding styles via className')
})
+
+test('resulting component gets sent valid props', () => {
+ const A = glamorous.div({}).withComponent('a')
+ const rendered = render()
+ expect(rendered.prop('href')).toBe('https://glamorous.rocks')
+})
diff --git a/src/create-glamorous.js b/src/create-glamorous.js
index 929a22c6..4205bc68 100644
--- a/src/create-glamorous.js
+++ b/src/create-glamorous.js
@@ -114,6 +114,7 @@ function createGlamorous(splitProps) {
{
...componentProperties,
comp: newComp,
+ rootEl: getRootEl(newComp),
},
{
// allows the forwardProps and filterProps to be overridden