Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel plugin #62

Merged
merged 9 commits into from
Jul 25, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/advanced/babel-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import SectionLayout from '../SectionLayout';
import CodeBlock from '../CodeBlock';
import Code from '../Code';
import Note from '../Note';
import Link from '../Link'

const installNPM = `
npm install --save-dev babel-plugin-styled-components
Expand Down Expand Up @@ -163,7 +164,7 @@ const BabelPlugin = () =>
literals down to a smaller representation than what Babel normally does,
because <Code>styled-components</Code> template literals don't need to
be 100% spec compliant. see{' '}
<a href="#tagged-template-literals">Tagged Template Literals</a> for
<Link href="#tagged-template-literals">Tagged Template Literals</Link> for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not being clear enough on this :( You'll have to pass the inline prop for it to show up with the correct styling: https://github.com/styled-components/styled-components-website/blob/master/components/api/helpers/with-theme.js#L52

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it ! It does look better now :p

more information about that) You can use the {' '}
<Code>transpileTemplateLiterals</Code> option to turn this feature off.
</p>
Expand Down