Closed RickEyre closed 6 years ago
Yes, of course. Could you provide a case where it does not work please?
Yes, of course. Could you provide a case where it does not work please?
Sure, what do you need other than what I provided above? I can expand the styles that I'm assigning.
// my-styles.js
export const input = {
display: 'block',
position: 'relative',
zIndex: 100,
borderRadius: 0
};
import React from 'react';
import styled from 'styled-jss';
import { input } from 'my-styles';
const Input = styled('input')(input);
export const TextInput = () => (
<Input type='text' />
);
Sorry, this was terrible of me. I didn't explain what was not working very well.
The type property of 'text' is not being passed down the base HTML input that is being rendered on the browser.
On react v15.4.2
Would you recommend 16 then?
Closing this issue as it seems the problem is not with styled jss. Thanks for the help!
Would you recommend 16 then?
We use is-react-prop to detect html-attributes like type
for input, but it may not to work with 16 version, but it should with 15.
The main idea of that package is that we can detect attributes without whitelists via react-dom
, and react-dom/lib/DOMProperty
should be inited.
Maybe you have 2 instances in the bundle (for example, some packages use different version), that cause this problem?
Please let me know if something clears up.
And we are working on the next is-react-prop
version, that should be independent of react
and react-dom
.
Okay, I've narrowed down the issue.
It doesn't assign the prop when importing the component into another node module.
I have one node package that defines these components and another one that is pulling them in as dependent for usage. It isn't working in that case.
I can post sample projects later demonstrating the problem... I'm just curious if you may have any suspicions about why this may be happening.
Maybe you have 2 instances in the bundle (for example, some packages use different version), that cause this problem?
Two instances of what, sorry? React?
Nevermind... this was caused by yarn link
.
Should this work?