Skip to content

Commit

Permalink
Merge pull request #46 from cssinjs/feature/fix-component-classes
Browse files Browse the repository at this point in the history
Fix React Component classes
  • Loading branch information
lttb authored Oct 13, 2017
2 parents 02120dd + 90e8604 commit f38a83d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ const styled = ({element, ownStyle, mountSheet, jss}: StyledArgs) => {
// $FlowIgnore
StyledElement.valueOf = () => {
if (!staticClassName) {
staticClassName = `.${jss.generateClassName({
staticClassName = `${jss.generateClassName({
key: generateTagName('static')
})}`
}

return staticClassName
return `.${staticClassName}`
}

// $FlowIgnore
Expand Down
4 changes: 2 additions & 2 deletions src/tests/__snapshots__/functional.spec.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ exports[`functional tests should use Styled Component classname in string 1`] =
>
<StyledElement>
<div
className=".static-2-id div-1-id"
className="static-2-id div-1-id"
>
name
</div>
Expand All @@ -177,7 +177,7 @@ exports[`functional tests should use Styled Component classname in string 1`] =
width={30}
>
<img
className=".static-3-id img-5-id"
className="static-3-id img-5-id"
width={30}
/>
</StyledElement>
Expand Down

0 comments on commit f38a83d

Please sign in to comment.