-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
85 deletions.
There are no files selected for viewing
29 changes: 6 additions & 23 deletions
29
...styled-components/transform/tests/fixtures/minify-css-to-use-with-transpilation/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
"use strict"; | ||
|
||
var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
|
||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5; | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
|
||
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } | ||
|
||
var Simple = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["width:100%;"]))); | ||
|
||
var Interpolation = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["content:\" ", " \";"])), function (props) { | ||
return props.text; | ||
}); | ||
|
||
var SpecialCharacters = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["content:\" ", " \";color:red;"])), function (props) { | ||
return props.text; | ||
}); | ||
|
||
var Comment = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["color:red;"]))); | ||
|
||
var Parens = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["&:hover{color:blue;}"]))); | ||
import styled from 'styled-components'; | ||
const Simple = styled.div`width:100%;`; | ||
const Interpolation = styled.div`content:" ${(props)=>props.text} ";`; | ||
const SpecialCharacters = styled.div`content:" ${(props)=>props.text} ";color:red;`; | ||
const Comment = styled.div`color:red;`; | ||
const Parens = styled.div`&:hover{color:blue;}`; |
42 changes: 21 additions & 21 deletions
42
...onents/transform/tests/fixtures/minify-single-line-comments-with-interpolations/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import styled from 'styled-components'; | ||
const Test1 = styled.div.withConfig({ | ||
displayName: "code__Test1", | ||
componentId: "sc-kc0mjf-0" | ||
})(["width:100%;"]); | ||
displayName: "code__Test1", | ||
componentId: "sc-bfa13f91-0" | ||
})`width:100%;`; | ||
const Test2 = styled.div.withConfig({ | ||
displayName: "code__Test2", | ||
componentId: "sc-kc0mjf-1" | ||
})(["width:100%;"]); | ||
displayName: "code__Test2", | ||
componentId: "sc-bfa13f91-1" | ||
})`width:100%;`; | ||
const Test3 = styled.div.withConfig({ | ||
displayName: "code__Test3", | ||
componentId: "sc-kc0mjf-2" | ||
})(["width:100%;", ";"], 'red'); | ||
displayName: "code__Test3", | ||
componentId: "sc-bfa13f91-2" | ||
})`width:100%;${'red'};`; | ||
const Test4 = styled.div.withConfig({ | ||
displayName: "code__Test4", | ||
componentId: "sc-kc0mjf-3" | ||
})(["width:100%;"]); | ||
displayName: "code__Test4", | ||
componentId: "sc-bfa13f91-3" | ||
})`width:100%;`; | ||
const Test5 = styled.div.withConfig({ | ||
displayName: "code__Test5", | ||
componentId: "sc-kc0mjf-4" | ||
})(["width:100%;"]); | ||
displayName: "code__Test5", | ||
componentId: "sc-bfa13f91-4" | ||
})`width:100%;`; | ||
const Test6 = styled.div.withConfig({ | ||
displayName: "code__Test6", | ||
componentId: "sc-kc0mjf-5" | ||
})(["background:url(\"https://google.com\");width:100%;", " "], 'green'); | ||
displayName: "code__Test6", | ||
componentId: "sc-bfa13f91-5" | ||
})`background:url("https://google.com");width:100%;${'green'} `; | ||
const Test7 = styled.div.withConfig({ | ||
displayName: "code__Test7", | ||
componentId: "sc-kc0mjf-6" | ||
})(["background:url(\"https://google.com\");width:", ";", " height:", ";"], p => p.props.width, 'green', p => p.props.height); | ||
displayName: "code__Test7", | ||
componentId: "sc-bfa13f91-6" | ||
})`background:url("https://google.com");width:${(p)=>p.props.width};${'green'} height:${(p)=>p.props.height};`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters