- Added specified props back in.
- No seperate props property, props are now element props
- Allow for subchld support (better handling)
- Minor fix
- BREAKING, props and child notation now simplified
import styled from 'styled-elements';
const Wrapper = styled.div`
padding: 10px;
color: ${props => props.something};
`;
const props = { something: 'red' };
// props and ...children
document.appendChild(Wrapper({ onclick: () => {}, ...props },
'Yes',
'Some Element here..'
));
// or no props, method children
document.appendChild(Wrapper('Yes'));
// or just array
document.appendChild(Wrapper(['Yes', 'Something']));
// or children in array
document.appendChild(Wrapper({ ...props }, ['Yes']));
In element props (ie. arg 1 if object), props
and children
are now reserved terms.
The props
term is now what gets injected. children
term is reserved for react notation.
- Interoperability, you can now inject css classes with props into each other
- All key injected chars are now escaped (i.e.
<
,>
,&
, '"', "'")- Note, while this does make injection less usable, it prevents a huge XSS attack vector
- Fix exports
- themes via (setTheme), makes globally available in state
- css function now available
- injectGlobal for global css injection
- Supports @keyframes now via styled.keyframes
- Optional double function notation (i.e.
Box()()
==Box()
)
- Basic testing
- Basic docs
- License
- linting
- basic exports