Releases: styled-components/babel-plugin-styled-components
v2.0.0
v1.13.3
v1.13.2
v1.13.2-test.1
Teach the plugin how to handle namespace import syntax properly, fixes #315 e.g.
import * as styled from 'styled-components'
const css = styled.css`
background: black;
`
const GlobalStyle = styled.createGlobalStyle`
html {
background: black;
}
`
const Test = styled.default.div`
color: red;
`
const before = styled.default.div`
color: blue;
`
styled.default.div``
export default styled.default.button``
v1.13.2-test.0
v1.13.1
v1.13.0
-
teach the plugin how to handle variable interpolation in object keys, e.g.
css={{ [theme.breakpoint.sm]: { color: 'red' } }}
-
plugin now emits transient props when replacing
css
prop calls (cuts down on garbage in the DOM for s-c 5.1+) -
merge withConfig arguments to allow for shouldForwardProp, thanks @ithinkdancan #323
-
move injected components to end of file scope, thanks @sfishel18
v1.12.1
v1.12.0
-
Add topLevelImportPaths option (#288)
This functionality allows the composer to specify alternate import locations for the "styled" constructor, for instance if you are using a third party library that wraps styled-components and does additional processing. See this test for how to use it.
-
preserve structure of JSX member expressions in generated ast nodes; this makes sure that other babel transformations that rename variables will be able to process the ast nodes created by this plugin. fixes #240