Files
test-repo/tests/multiparser_js_css/styled-components.js
T
fisker Cheung 179943ccba Update @babel/parser to v7.6.3 (#6386)
* fix flow_function_parentheses

* fix directives

* fix classes

* fix flow_method

* fix `do`

* fix `decorators`

* fix `comments_closure_typecast`

* fix `comments`

* fix `flow_internal_slot`

* fix `flow_comments`

* fix `flow_type_declarations`

* fix `flow_type_spread`

* fix `functional_composition`

* fix `multiparser_js_css`

* fix `no-semi`

* fix `objects`

* fix `template`

* fix `yield`

* update `flow_method` snap

* fix `empty_paren_comment`

* fix `mdx`

* fix `object_property_comment`

* Update `@babel/parser`

* Update @babel/parser to v7.6.2

* Update yarn.lock

* fix `nullish_coalescing` test

* fix `flow_class_field` test

* fix snapshot

* @babel/parser v7.6.3

* fix tests

* update snap
2019-10-09 14:52:11 +03:00

159 lines
2.2 KiB
JavaScript

const ListItem1 = styled.li``;
const ListItem2 = styled.li` `;
const Dropdown = styled.div`position: relative;`
const Button = styled.button`
color: palevioletred ;
font-size : 1em ;
`;
const TomatoButton = Button.extend`
color : tomato ;
border-color : tomato
;
`;
Button.extend.attr({})`
border-color : black;
`
styled(ExistingComponent)`
color : papayawhip ; background-color: firebrick`;
styled.button.attr({})`
border : rebeccapurple`;
styled(ExistingComponent).attr({})`
border : rebeccapurple`;
styled.div`
color: ${props => props.theme.colors.paragraph};
/* prettier-ignore */
${props => props.small ? 'font-size: 0.8em;' : ''};
`
styled.div`
color: ${props => props.theme.colors.paragraph};
/* prettier-ignore */
${props => props.small ? 'font-size: 0.8em;' : ''}
`
styled.div`
/* prettier-ignore */
color: ${props => props.theme.colors.paragraph};
${props => props.small ? 'font-size: 0.8em;' : ''};
`
styled.div`
color: ${props => props.theme.colors.paragraph};
/* prettier-ignore */
${props => props.small ? 'font-size: 0.8em;' : ''};
/* prettier-ignore */
${props => props.red ? 'color: red;' : ''};
`
styled.div`
/* prettier-ignore */
color: ${props => props.theme.colors.paragraph};
/* prettier-ignore */
${props => props.small ? 'font-size: 0.8em;' : ''};
/* prettier-ignore */
${props => props.red ? 'color: red;' : ''};
/* prettier-ignore */
`
styled.div`
${sanitize} ${fonts}
html {
margin: 0;
}
`
styled.div`
${bar}
baz
`
styled.span`
foo
${bar}
baz
`
styled.div`
foo
${bar}
${baz}
`
styled.span`
${foo}
${bar}
`
styled.div`
${foo} bar
`
styled.span`
${foo} ${bar}
baz: ${foo}
`
styled.span`
${foo};
${bar};
`
styled.span`
${foo}: ${bar};
`
styled.span`
${foo}: ${bar}
`
styled.span`
${foo}:
${bar}
`
styled.span`
${foo}:
${bar};
`
styled.a`
${feedbackCountBlockCss}
text-decoration: none;
${FeedbackCount} {
margin: 0;
}
`
const StyledComponent1 = styled.div`
${anInterpolation}
/* a comment */
.aRule {
color: red
}
`;
const StyledComponent2 = styled.div`
${anInterpolation}
/* a comment */
.aRule {
color: red
}
`;